For as long as there has been crime, there has been punishment of one kind or another. Each country of the world has laws and punishments unique to them.
A very interesting essay is to be found here - for those, interested in history and/or "eye-watering medieval methods":
Eye for an Eye? - Crime and Punishment in Early Modern Germany
I'm just thinking about the possibel crime to kill some children in a foreign, sovereign country ... and a may-be terrorsit and the impossible punishment for that.
And then I remember the story about that sickly, unkind, wealthy old woman, who is bound to die any day. She is said to be "simply useless" to society and thus is not contributing. Should she die, her money will be given to a monastery where it will squandered within the church. Yet on the other hand, should someone decide to end this old woman's life and take her wealth and spread it out amongst the poverty of their city, they could save hundreds, even thousands of lives that would otherwise end up in ruin and destitution, hospitals and/or closed houses.
Obviously, the situation we are given to deal with in "Crime and Punishment" is one which deals with the morality of what is the right thing to do.
And this is -IMHO- a product of society, of culture and history.