The Spanish Main consisted of the Carribbean coasts of Florida, Mexico, northern South America, and the waterways that served their ports. The riches of the Spanish Empire were concentrated in this area and drew the attention of many a hopeful scallywag.
The Spanish Empire in the Americas largely consisted of Florida, Mexico, Central America and northern South America. From these regions the Spanish reaped mind-blowingly vast amounts of wealth in the form of gold, silver, precious jewels, New World spices and hardwoods, tobacco, and other goods. These riches would be hauled to the Caribbean coast, loaded onto galleons, and shipped back to the motherland. Goods from Asia were also brought in from the east to Acapulco, brought overland to Veracruz, and added to the treasure fleet for transport to Spain.
This is the major reason why the Caribbean was so rife with pirates. A Spanish treasure fleet was not easy to capture, but perhaps trailing the fleet you could pick off a straggler and immediately retire! This did not happen often, but the presence of such vast riches was enough to attract the hopes and aspirations of many an outlaw, who would then wise up and pick easier targets.
There's also a film entitled "The Spanish Main," and there are pirates in it. It is an adventure film from 1945. Check it out if you're so inclined: