I encourage you to read books such as Villains of All Nations by Marcus Rediker (or anything else by him really) or The Republic of Pirates by Collin Woodard. Pirates of the golden age had a negative reputation by other non-pirate sailors, merchants whose trade had been disrupted, politicians, slave owners, and religious leaders. The proletariat was already romanticizing them and regarding them as folk heroes during the golden age itself.