The OP needs to spend a few years working in a prison beofre commenting.
The OP does not seem to have the slightest understanding of the work that takes place in prisons to address reoffending, education, mental and physical health issues, employment training etc etc etc.
Oddly enough, I do actually think there is a place for such institutions of a very similar nature, fortunately so do many governments as well, as a result just about every country in existance has differant levels of classification of prisons from the lowest security for the milder offences, right through to the US supermax.
If the OP is addressing the recidivist prisoner, there is a debate to be had here.
It is not all that rare to come across prisoners with perhaps 200 offences, or more.
Such individuals are unlikely to contribute to society in their lifetime, and worse, they can and do father children who may well end up as criminals themselves.
I have come across this many times, where prisoners will talk about their family background which will involve close family members also immersed in crime.
It would seem there could be a case argued for doubling up the jail term every time a criminal appears before the courts.
Typically, a heroin addict will have a $400 - $800 a week habit, to get that money they may have to steal, rob or deal themselves.
Whatever they steal will usually onlt get a fraction of its value from fence, to get that $400 the addict will have to steal over $4k a week, every week.
Its cheaper and less stressful on society to never let them out, on so many levels it would be kinder on the rest of us.
The costs of the revolving door involve police investigation time, the judiciary, insurance claims and the human cost which cannot be so easily calculated.
The UK is slowly evolving its criminal justice system so that repeat offenders end up on a life licence.
Upon release, the criminal must adhere to specified terms on his licence of freedom. This can involve not frequenting a district, it may involve not associating with certain individuals, or types of individuals(such as gang bangers)
Breach any of these terms, and the licence is revoked, the criminal goes back to jail, no trial.