One of the points to come out of the comments on my last post is that while the outlaw life has a certain transgressive thrill in its own right, it works much better for Romance if pirates (or outlaws of whatever sort) aren't in it just for robbery, but for some higher cause as well - getting one back at the Evil Empire, or whatever. This also goes hand in hand with giving the pirate some social standing, even respectability.
Historical precedents are not hard to find. Piracy today is alive and well, but unrelievedly squalid. Yet a couple of hundred years ago true piracy, "against all flags," was just one end of a spectrum of sea-raiding that also included corsairing, privateering, and naval commerce raiding by official warships. (Corsair today is synonymous with pirate, but there was a distinction - corsairs were more or less selective in their victims, at least in theory targeting only Christians, or Spaniards, or whomever.)
Much of the glamour of piracy is a spillover from these semilegitimate forms of sea robbery - in Howard Pyle's wonderful illustration Attack on a Galleon (1905), the galleon is obviously Spanish, with a Catholic icon on her lofty poop - superstitious Papists, the lot of 'em - while the attackers are implicitly good English Protestants. You don't need Fox's Book of Martyrs to know which side to root for here.
It wasn't always that way. The ancient world had plenty of piracy (the word pirate is from Latin, after all), but so far as I can tell it had almost none of the semi-respectable variations, such as privateering.* For that matter, it did not even have naval commerce raiding - or at least, none that our sources saw fit to mention. In Thucydides, navies fight each other, and launch shore raids, but they don't raid each other's merchant shipping. Sparta had no merchant marine, but its ally Corinth did, and on the other side Athens certainly did. It's hard for me to imagine that Athenian triremes never nabbed Corinthian merchantmen, and vice versa, but it never made the papers.
Compare this to the great age of sail. Anyone who has read their Hornblower, or Aubrey and Maturin, or Bolitho, or any of that genre, knows that prize money was a leading preoccupation of naval officers and seamen. "For even Aristotle would be moved by prize-money," says Captain Aubrey to Maturin, early on - unaware, perhaps, that Aristotle never heard of such a thing. These characters are from the annals of Romance, not history, but history bears them out. Commerce-raiding, guerre de course, was an established naval strategy, and part of its appeal was that it could largely pay for itself - if not from the actual proceeds of looting, then from the eagerness of seafarers to fit out privateers.
This contrast might be laid to technical differences between sailing ships and galleys - galleys, with large crews and small holds, could not stay at sea for long raiding cruises. Yet medieval Mediterranean seamen had no problem using galleys for commerce raiding; the Barbary corsairs got their start that way. Earlier still, when the Genoese came up short against the Venetians in fleet battles they switched to commerce raiding in the next war and won that round. The continuum from naval commerce raiding through privateering and corsairing to outright piracy can be traced back in the medieval Mediterranean till it's lost in the haze around AD 1000 or so.
I have a theory about this, worth what you paid for it: that the culture of prize-money at sea was borrowed from Islamic civilization. From early on there was a Muslim tradition of ghazis, freelance holy warriors who lived on the proceeds of raiding the infidel - really, just timeless desert raiding, but now with a gloss of respectability since it was being done in God's cause.
The Barbary corsairs were in this business, but it wasn't peculiar to them, or to Muslims - the Knights of Malta were in effect Christian corsairs robbing Muslims, and Drake and the other English sea dogs were Protestant corsairs robbing Catholics. Yet the idea of combining good old plundering with fighting for a cause had to originate somewhere, since it was absent from the ancient world, and the ghazi tradition came into play at the right time to explain the difference.
So when you go to see Pirates of the Caribbean, remember to thank the Muslims for making a pirate's life glamorous, not just nasty, brutish, and short.
Which I suspect is not the only unwitting contribution that Islamic civilization has made to the Western tradition of Romance.
* The exception to prove the rule is Sextus Pompey's resistance to the Second Triumvirate, which included a raiding war at sea till he was defeated by Marcus Agrippa in 36 BC. (Admiral, architect - a talented guy was Agrippa.) Whether anyone in the late Republic's civil wars was fighting for a higher cause is doubtful, but this is the only classical instance I know of commerce raiding for any objective beyond plunder itself.