If you made your living on the sea during the golden age of piracy, whether or not you got to pass was all about the flag you flew. Flags separated the British ships from the Spanish. They separated pirates from privateers. They separated someone you attack from someone you don't.