You've followed a link for necessary evil, this probably refers to:

* A character who feels they have to be evil for the sake of a greater virtue: NecessarilyEvil, or some associated trope
* The comic series ''Comicbook/NecessaryEvil''