Ok let's start with the most obvious thing first. Pirates of the Caribbean was not a documentary. Most of the "pirates" in that movie were pirates in name alone. In most cases the worst thing they did was steal something that was already stolen by someone else or make a mean face towards the hero. It was sort of like watching a movie about cannibals who never actually eat a person. Don't get me wrong, the movies and more importantly, the rides at Disney are a lot of fun. Still celebrating pirates is a lot like building a ride around a group of terrorists and killers, which is what they were. Disney could probably make anything fun looking though. I'm still waiting for them to make a love story about two adorable scorpions.
We'll back it up a bit. Piracy is a pretty simple concept, which is basically robbery and/or violence at sea by a private party not affiliated with any government. Notice the last part about the government. If you acted on your own then you were a pirate. If the government sponsored your violence then you were just a privateer. Granted this was normally allowed during wartime because some nations didn't have a navy, including our own fledgling nation at one point. In a lot of cases sailors became pirates out of necessity and not out of some strange love for adventure. It's very similar to modern times where if your choice is to work forty hours for minimum wage or join a crew of people who can make ten times that in a fraction of the time, one might consider taking the more direct route to earning money.
It's pretty much assumed that for as long as there have been boats in the water there have been pirates of some sort. I'm sure that shortly after the invention of the wheel someone got the brainwave to use it to aid them in stealing from someone else. Admiring pirates also isn't a new thing, although it's recently become more popular thanks to both the movies and internet. During his time, Bartholomew Roberts was considered a hero by some and when he died it signified the end of the Golden Age of Piracy. While he was one of the most successful pirates of that era, he was still considered an outlaw by various governments. Roberts primary focus was capturing ships and disrupting sea trade, which was a big deal back then. It would be kind of like highwaymen hijacking shipping trucks along the freeways. Essentially it would grind commerce to a halt. You mess with people's money and they get really mean really fast. That dashing buccaneer doesn't look so great once you realize that he's just stolen the shipment of supplies that were meant for you and your colony. People find comfort in the laws of a civilized society and when they're tossed out the window the results can be explosive.
Strangely enough though many pirate vessels of that time adopted a democratic form of rule on board. The captain and quartermaster were elected by the crew, and the crew were appointed by ship's officers. This created a set of checks and balances very similar to our own government. Based on rank each member of the crew would receive a share of the captured bounty. This is also how modern fishing boats tend to divide up the profit from a haul. The whole idea makes me wonder if maybe it's not a bad form of dispensing compensation. We like to think that pirates stole treasure and buried it on some hidden island, but more often than not that treasure was just food, alcohol, weapons, or clothing. Sure they stole money when they could, but not all the ships in the ocean had a treasure chest of jewels in their hold. So pirates took what they needed, which could also include the ship that they just attacked, simply because it was better than what they were currently using. For a bunch of guys who were operating outside the law, they tended to create order of their own.
There is also this idea that pirates were bloodthirsty. Some of the raiders were probably more murderous than others and nearly all pirates were dangerous, with the exception of those from Penzance. Even still pirates tended to kill few people aboard the ships they captured. If the crew surrendered there was a good chance no one would be killed, at least not during the taking of the ship. Again this wasn't because of some sense of honor, but more about practicality. If it became known that pirates took no prisoners, then those being attacked would fight to the last man because they knew if they didn't, they would be murdered anyway. The whole thing would make victory very difficult and possibly not worth the cost in lives. The same tends to hold true today, where less than 10% of pirate attacks result in murder. Not being killed by pirates doesn't make the whole experience any less dangerous, just like being present during a robbery today could go either way based on the situation. Most pirates were and are more concerned with making a profit from the attack. If they kidnap the crew for ransom and kill them regardless of payment, then no one will pay, instead they'll just hunt them down with the intent to kill.
We like to think of pirates as these adventurous and clever rogues who make their own destinies. While there may be some out there that fit that description, a pirate vessel is more likely filled with a bunch of people who have come to the conclusion that it's more beneficial to steal from others than try to find so-called legitimate work on the rivers and oceans. Just like bank robbers and car thieves it may seem somewhat glamorous to live like Robin Hood. The reality is that it only seems cool until you notice the fact that their chosen profession is actually more work and more dangerous than that 9-5 job you've got, where you're safe in your cubicle. Plus there probably haven't been as many reported cases of scurvy. I'm not saying pirates are lame. They're mostly overrated, as many things tend to be when they become really popular.