Hey you, what are you getting treatment for down there, you must have been diddling someone. So your break-in artist doesn't want treatment, and doesn't get it. But presumably you need a secure setting to carry out a sentence, including treatment, because of the risk of flight. A. Oh, escape. You know something, most inmates don't want to escape.
Prison is the place where they have a modicum of community.
They have peers. They're not that anxious to escape. Lookit, the biggest problem is that we as a society are not really serious about rehabilitation. Over and over everybody calls our prisons a failure. Prisons demonstrably fail to rehabilitate the inmates.