In having served almost 10 years in prison for drugs. I can say that medium and maximum security prisons are often a breeding ground for killers, and dangerous people.
Young kids who have done something incredibly stupid usually end up in these places. They are then immediately put in a situation to fuck or fight. This behavior will often escalate to extreme violence or to be broken psychologically, then owned by other inmates, bought and sold like property. Can that kind of behavior be unlearned? I doubt it... I would argue that at best, people can only learn to do something better, but always lurking in the background.
This is only one of many of the bizarre insanities of prison life. I personally don't disagree with the idea of punishment or prison. I would however say that prisons are extremely dysfunctional.