Think of fairly small ships roughing it on the open sea with little defense, not the rows of cannons you see in ships of later centuries. Even a "royal navy" would be small and not necessarily able to swiftly come to the aid of each other if a couple vessels of well-armed and determined sailors approached them. Also, maintaining a navy could be expensive. Even Henry VI in the early 15th century got rid of his standing navy, prepared to hire ships if ever he needed them.
Not that piracy wasn't a known peril; it just wasn't easy to control, although attempts were made. Of course it was outlawed, but catching and punishing a pirate was not the easiest of tasks.
The image here is a modern translation/copy of the earliest known record of punishment for a pirate prior to the 1700s. It reads:
An order was given to the Bailiffs of York as to the ship which they caused to be arrested because William de Briggeho, who was afterwards hanged for consorting with malefactors who robbed her off Sandwich, was found on board her.
The lord the King, has ascertained by inquisition that the ship, together with the chattels on board her, belonged to William Belemund, of Grimsby, and he commanded the bailiffs that they should cause her to be delivered to William Belemund without delay.
1228September 19th is International Talk Like a Pirate Day.