Is there a single word that means: doing something bad in the name of something good?

Consequentialism

Noun

"Consequentialism is the class of normative ethical theories holding that the consequences of one's conduct are the ultimate basis for any judgment about the rightness or wrongness of that conduct." Wikipedia.