It's very sad. I would like to see more resources and time devoted to creating some kind of compromise solutions for this problem. Have read about prison systems with lots of people in there who don't belong.
Then again, it's very hard sometimes to make determinations. Because guess how many people convicted of crimes want to claim mental health as the basis? Answer: 100%. And I don't blame them, really. I can't imagine having the job of someone who "decided" who was a true SMI case and who wasn't, especially if I knew that what was at stake was their freedom + other people's well being.
But if there is a segment of the population of people convicted of crimes who experts overwhelmingly agree have as their main cause, serious mental health issues (SMI population), then they should go to a place like the one you described.
Even out of those people, I think many of them could be free if there was some way of 100% enforcing their taking of their meds and any other treatment sessions needed. Sounds maybe like draconian surveillance, but if I were them I'd rather that than being in custody.