Some countries (like ex-USSR) also practice _punishing_ for a crime in prison -- further humiliating and abusing convicted person. Don't know if there's a reason (if ever were), but some people argue that it helps to reduce future crimes by other people ("don't do that, or you'll get to prison, you know what they do there"). Can't tell if it's supported by statistics.
In other countries, like Norway, justice systems are the other way around -- besides removing criminals from society, they also bear a job to re-socializing criminals -- treating them humane and helping them to find a job after the prison.
These other responsibilities affect answer to your question.
Yes. Not every person "damaged" in this manner gets a life sentence, having committed lesser but still serious crimes. How we treat them in prison and afterwards matters, and an understanding of the causes helps.
Punitive, harsh incarceration likely creates/exacerbates a bunch of damaged people with little hope of a future afterwards.
Personally, I believe there are too many interests at play that are quite happy not to have their methods questioned, and "preventing the next psychopath" has an element of the Y2K problem, in that, if successful, all you get is "Was that really necessary? Are you sure you didn't overstate the problem? Did we really need to spend all that money?"
One of the goals of the justice system is to protect society from criminals by removing them from it, temporarily or permanently.