A superhero can be a vigilante or a law enforcement officer - it goes with the territory. Captain America, for instance, has been both: from being a government agent in the fight against the Nazis to telling the government to shove it and becoming a vigilante more than once.
Batman too has often been a deputy or at least licensed by the Gotham City Police Department but he’s best known as the Dark Knight, with the GCPD turning a blind eye to his own brand of justice.
The point is the capes and cowls crowd works for truth and justice, rather than the letter of the laws. Their actions are governed by morality and a sense of right, but they still tend to operate to their own set of established rules. No killing, no innocents, no swearing... Whatever they may be.
Yet, there comes a time when even the greatest heroes have their personal codes of honor tested. Those exceptions to their rules can also create a gripping story, truly challenging the very foundation and concept of a character.
10. Wonder Woman Snaps A Neck
The set-up: Maxwell Lord is influencing Superman to attack people. He’d already beat up Batman and now, he’s going after Wonder Woman, implanting the idea in Superman's head that she is actually Doomsday hunting Lois.
During the fight, Wonder Woman creates a diversion long enough to get to Lord, using the Lasso of Truth to get him to tell her how to stop Superman’s rampage. He says two words: “Kill me” and she does, shockingly snapping his neck. This becomes a huge deal when Brother Eye broadcasts the footage of her killing him to every television, which is arguably the more important rule being broken.
Wonder Woman is a tricky character to really quantify when it comes to her rules and morals. While she IS a moral person from a warrior race of women, her society is not necessarily opposed to killing, just murder. Writers do give her various morals, though you can generally tell which mindset the writers go in with if she’s carrying a sword or not.
The real rule broken here is a general rule of superheroics: the comfort rule. A hero, be they vigilante or deputized in some way, is on the side of the people and the greater good. They’re allowed to continue their actions with a positive outlook because they make the citizens of their respective worlds feel safe. The second that Wonder Woman snapped a guy’s neck in front of a camera, she broke the Golden Rule of Superheroes.