By some accounts, prison is an opportunity to network and gain mentors and knowledge towards furthering a career as a criminal.
There's no real intention of transformation or revenge, just a form of quarantine.
If considered as a criminal networking opportunity, it's likely to transform people into those who would seek revenge, and it would have the opposite effect intended by quarantine.
EDIT: I'm reminded of a folk dance group I was once a part of. Usually, we were obscure, and the one or two new people who might show up would become immersed in what we did, and would quickly learn to dance. Once, there was a local newspaper article about us, and 16 newcomers showed up all at once. It was very difficult that evening, and I think a lot of the newcomers didn't learn much.
If we want incarceration to make people less criminal, not more criminal, then the prisoners should not be spending their time with criminals. The prisoners should be spending their time with mentors, teachers, and counselors.