Well I would say I consider there to be some kind of sliding scale: on the one hand, a person acting with malicious but totally rational intent; on the other, a mad person acting in an irrational way involuntarily; and, in between these two, someone with what you might call a personality disorder: a person with violent/criminal/antisocial tendencies who has some mitigating personal history (broken home, rough school, drug/alcohol problems, all the usual suspects).
A person in the third category is not going to be helped by a legal culture that says, without qualification, "there there, it wasn't your fault, you can't help it and can't be held responsible for your actions", as he will then get used to the idea that it's his right to carry on acting in this manner. If you tell someone they're not responsible for themselves, they will act irresponsibly, surely? At the same time, every effort should be made to try and help the person adjust to a normal, non-criminal life, as a huge proportion of prison inmates have mental problems of one sort or another and very often almost nothing by way of qualifications and job prospects. All in all, I think there should be much more emphasis on rehabilitation in the justice system, rather than simple punishment.