Jonathan Haidt said this quote

Idealism easily becomes dangerous because it brings with it, almost inevitably, the belief that the ends justify the means. If you are fighting for good or for God, what matters is the outcome, not the path. People have little respect for rules; we respect the moral principles that underlie most rules. But when a moral mission and legal rules are incompatible, we usually care more about the mission.