Punishment for a crime committed has been the way of things from the beginning of time. However, the severity of the punishment meeting crimes have varied and lessened as the world, and society, has evolved and changed. Durkheims beliefs focus on societys concern and outrage, and that society determines the appropriate punishment for each crime.

In contemporary (organic) society, crimes against the person and against personal property arouse the greatest resentment and receive the harshest sanction because they violate a morality that places the qualities of the individual above all else. (Sociology of Law p.63)

There is a sense of security and a common goal of morality that govern society.
To go against these morals is to insult and jeopardize society as a whole, not just on an individual level. Just a couple of hundred years ago punishments were more severe. A horse thief was hanged a woman accused of infidelity could be stoned, outcast and banned, beaten and imprisoned. These crimes still exist in present day society, but the punishments rendered are not as harsh.
Instead, many organizations have evolved that are concerned with protecting the rights of the accused and guilty. Although there are still states that participate in the death penalty for especially heinous crimes, for the most part courts and judges are bound by acts of humanity when deciding upon punishment. Prisoners are given certain rights and expect to be treated with some modicum of dignity. The punishment needs to fit the crime but at the same time the rights and protection of the accused and condemned must be upheld.

Everything which is the source of solidarity is moral, everything which forces man to take account of other men is moral, everything which forces him to regulate his conduct through something other than the surviving of his ego is moral, and morality is as solid as these ties are numerous and strong. (Durkheim, Emile)

While society demands punishments befit the crime, there are difficulties deciding how severe the punishments may be. Innocent until proven guilty is the theme in todays court systems. And, even after being judged amongst their peers and punishment placed on the crime, criminals are still given rights and respect as a human being it is the moral thing to do.