Really, they don’t. They don’t need to be an anti-hero, either. Protagonist doesn’t mean “good guy,” it means the main character, the lead, the person who does the most stuff. Greek words are nifty that way. Your main character doesn’t have to be likable, either. At least not in a “I’d be happy to sit down at dinner with that person, she seems swell” sort of way. They can’t irritate the reader so much as to be unreadable, but they can be a jerk, or evil, or both. Let’s face it, heroes have gotten boring and a little unbelievable. And in fantasy writing, loosing the audience’s suspension of disbelief is a bad thing. While there is perhaps a need for the better than us all sort of hero there is also a need for the just like me or worse protagonist who comes out in the end not to save the day but just to come out in the end.
I have both kinds of protagonists in my writing. On the one hand there is Dr. Ezekiel Jones, exorcist and all around good guy. He, like Harry Dresden, tries to do the right thing, even if it puts himself in harms way. On the other hand there is Marcus Faust, demonologist, sorcerer and assassin. He is officially not a good person. He does what is necessary to live to see the next day, and if he can kill off someone whose been harassing him in the process, so much the better. He’s rich, arrogant and powerful, and he knows it. He’s also a really fun character. Not that Ezekiel isn’t, but Marcus, due to a Grosse Point Blankian moral compass, is capable of doing things Ezekiel isn’t.
Because Ezekiel is a hero. Marcus is a villain.