The Biblical notion of crime and punishment is that every crime has a price which must be paid. Thieves must return what is stolen (and then some). You have "eye for eye and tooth for tooth". This provides some disincentive (although sinners always sin, so total prevention is not possible).
The key is that justice must be well defined and swift. The greater the separation between the crime and the execution of judgment, the greater the injustice.
Our modern system has evolved from Biblical principles, but has lost these key Biblical truths. It has also been under attack by atheistic principles.
For the materialist, a human being is a stew of chemicals, bound to react according to the environment. Notions of "responsibility" or "culpability" are lost. Justice is not about paying a price, but seeking to inject some correcting factor into this stew. This is perfectly represented by this Slashdot comment.
In response to:
"Is personal responsibility compatible with atheism?...If we are nothing more than a chemical being, then where does personal responsibility come into play?"
"Yes. I hold both these beliefs. The justice system is not about blame, it's about keeping criminals safe from society and (in my mind) rehabilitating them."Note the inversion of the standard. The justice system is not about keeping society safe from criminals, but the exact opposite.