Before I went to law school, I did an undergrad degree in Psychology and it is a proven fact that a punitive system increases recidivism. In fact, I'd go so far as to say, and there is data to support it, although I don't have it at hand, that for many, jail/prison focused on punishment, especially for first-timers and younger inmates, becomes a kind of offender college, producing a smarter, angrier criminal and then releases him/her back out onto the streets. If the root causes of criminal behaviour aren't addressed, things like mental health issues, abuse, education/job prospects, etc., it's foolish to think the behaviour will change.
Hell, here in Canada, I have known of people that will commit petty crimes (this is pre-Covid) just to have 3 hots and a cot for the winter. Let that sink in. I know it's a little off the topic of your story, but still, rather than face winter on the streets, these people will deliberately seek to have themselves tossed in jail. Damn, I could go on and on with what's wrong with the system, but I don't want to be "that person" who clogs up the comments with article length replys. :)