I never understood prison as a deterrent. As a place to put dangerous people, sure... but free room and board in exchange for limited freedom? At some point the economic reality is it makes sense to cause some trouble just to get fed and out of the cold.
I realize the thread is about mental health. The problem with mental hospitals is they were abused. Husbands would commit their wives as being "histerical" and put them on lithium or other psychoactive drugs. Getting rid of them completely was an obvious mistake. There are many unstable and untreated people with no where to go so they just "mill about" in urban areas, often shouting nonsense and acting paranoid. It is quite unsettling. Especially if you have children that don't understand what's happening. Once beautiful and safe cities are overrun with the drug addicted or insane.