Pirates sail the sea because they can do what they want. A pirate is free, and that freedom is the point of the joke.