The mind of the people can change. For example the sitcom "Friends" was very..... "modern" for its age, but today it wouldn't be wellcome by the current generation. Other example, let's imagine in a old work a lesbian (who doesn't hide it) character is added to show they are gay-friendly, but today the gay community wouldn't be happy with that character because this gives the bad image of gays because she was too promiscous (and a wrong fashion style).
Pirates are allowed as antagonists, because they are criminals the heroes are going to kick-ass. But if the main character is a corsair, then this should obey some "honor code", for example not attacking civil towns nor unnarmed civilians, respect for the enemy who surrenders, attacking only ships from an enemy power, not neutral countries, not slaves traffic (rescue of prisoners is different)...
The pirates can't be the symbol of independence from external authority. Centuries ago the Otoman pirates attacked the coasts of my land to catch slaves. The men were castrated to be eunuchs (not everybody survived) and the women for the harems. In Spanish languange the expression "moors on the coast" means "sign of danger or menace".
And could you explain me the reason because in a fantasy world a pastiche of Spanish conquerors can be showed as evil antagonists, but not based in Otoman pirates? Why not an action-live movie about the battle of Lepanto, because it would be too ofensive for Turkey?
Today the current generations understand the native Northamerican community has got a different opinion about the old far wests where the "redskins" were the antagonists.
I don't like when the authors talk about the past and the History, and the critiques always is toward the same side, but keeping totally quiet about the actions by others. That is a double standars, "to use use two different yardsticks to measure".