How did pirates become such beloved characters?

How did pirates become such beloved characters? The idea of [...]