Full Idea
Whoever wills the end also wills the means. ...The death penalty inflicted on criminals can be viewed from more or less this point of view. It is in order to avoid being the victim of an assassin that a person consents to die, were he to become one.
Gist of Idea
We accept the death penalty to prevent assassinations, so we must submit to it if necessary
Source
Jean-Jacques Rousseau (The Social Contract (tr Cress) [1762], II.05)
Book Reference
Rousseau,Jean-Jacques: 'The Basic Political Writings', ed/tr. Cress,Donald A. [Hackett 1987], p.159
A Reaction
This seems to be roughly the spirit in which Socrates submitted to his death. I doubt whether many criminals agree with harsh punishments dished out to other criminals who get caught.