Every great example of punishment has in it some injustice, but the suffering individual is compensated by the public good.
"Annals". Book by Tacitus. Book XIV, 44,

Every great example of punishment has in it some injustice, but the suffering individual is compensated by the public good.