Explanation: During the Age of Sail, it was common for states and monarchs to offer 'letters of marque' to certain [ahem] enterprising individuals. By sailing with a letter of marque, one agreed to only attack and plunder ships belonging to whatever nation your patron was at war with at the moment. In exchange... you got to attack and plunder merchant ships (of certain countries) without being wanted for piracy! And you don't even have to sign your entire life away to the Royal Navy!
All the benefits of being a pirate, none of the noose-related drawbacks! I mean, unless the enemy caught you. Or you became politically inconvenient.