I think it is unfair perching on the creator of OP the notion of "being a pirate is cool", this one already existed in the american side for quite a while before this piece of fiction existed. He didn't invent the good-pirate trope.
I don't know from when it started. pirates used to be menacing and scaring but somehow newer generations have become fascinated with them and the whole idea of living up to sail the seas and find hidden booty. It is quite easy to forget that real pirates still exist and like you say they're awful. In my ignorant mind pirates stopped thriving after the medieval wooden boat times. These incorrect notions don't help things.
I was at a friend party and a woman found a book about pirates for kids and she was almost in tears asking the same thing you do. She couldn't understand how could we be praising people that do barbaric things, people very real from where she came from. I think the stereotypical pirates we picture and the pirates that currently are around are two different things now. We're too busy with our romanticised version of them to realise implications and conveniently letting out the darkest patches.
It is an interesting reflection, if only to be aware of this and even to spread around about this reality. Still, i don't think we should feel guilty for enjoying works like One Piece where the good morals are exalted.