tl;dr Because punishment deters and because it feels good ("desert").
Article raised insignificant, pathological counter-arguments:
If robbery is punishable by death, then thieves are more likely to kill their victims to squelch witnesses.
Since suicide was religiously verboten, suicidal mothers engaged in capital crimes to enlist the authorities to off them.