I think it may boil down to the severity of the crime. If someone has done something really horrific, you could say by definition that person is at least unhinged, as a well-adjusted person simply wouldn't do something like that. Maybe it isn't so much an insanity issue so much as it is a morality issue, because many or most people with mental health issues react against their bad experiences by trying to do better than their experience, while others become bitter and vengeful, but I do accept that in some cases a person really does not know what they are doing. Mental illness is often the result of stress, often including a sense of threat, so someone who has cracked may lash out in a delusional sense of survival, and if there is psychosis they may not be aware of reality or who they are attacking. If that person can be treated, medicated and monitored then they might be released, again, depending on the severity of the crime, and Suzi, I guess what you were saying about some people getting meds delivered while others cannot even get basic medical treatment is like what I was saying about how much of a an inconvenience someone is to society. It is messed up in the US. I was watching The Incredible Hulk today, and it's interesting that, even when the beast inside is released, it does not kill, and that's because it's a part of an essentially moral man.
You can look at and understand the development of people who go on to do terrible crimes, and you can say they were just products of their environment, but there has to be a point where they took things into their own hands and have a responsibility for what they did, and pf, I'm not always sure, on the extreme end, that psychiatrists can be able to see behind a mask, if that person is a predator and can adapt to every situation and flatter the psychologist, but your point about compassion is right and true, if they are able and willing. Small crimes where you hear of the criminal meeting up with the victim, and they come to understand it wasn't anonymous and affected someone, can be a really positive thing.