Like slavery in the 18th century, prisons are a necessary evil to punish people who do not deserve rehabilitation, correction or edification. Conditions have to be bad enough so that a large segment of the rock-bottom citizens don't commit crime just to get some hope. Therefore the conditions of prison have to be a few steps less desirable than being homeless, penniless, cloth less, hungry and with no hope of getting out of it.
It's my belief that jails are full of criminals because we don't understand the mental illnesses that brought them there. If we can do whole-brain simulation, emulation, and detection in a client, I think studying the body of brains in jail vs the body of brains outside jail will reveal some remarkable findings. It could be their ethical systems were coaxed into the off position, and we may be able to detect this before a person commits crime. Saying: "You better get your ethical centers back on-line, or we'll have to put you under increased surveillance".