Many of the asylums were horrible and without hope, due to longstanding medical orders for which there was no effective treatment. The advent of effective psychopharmacology changed that: people with bipolar depression, for example, devastating post-traumatic stress based depression,, devastating post-trautmatic stress, and numerous other problems became treatable and could be treated as outpatients or with short stays to stabilize their medication, then released. Care really did improve in the 1960's and early 1970's, when the psychoactive medications were better understood and seized upon with great joy by doctors and patients who'd before felt quite hopeless. Unfortunately, this became coupled with cost-saving "return to the community" programs and policies, and we wound up with _enormous_ numbers of ill people who could not safely live on their own, turned out without structure to remember to take their medication by themselves.
The results have been predictable: numerous confused, somewhat insane people were left without the help they needed because their smaller, modern, fragmented families could not possibly fill in the gap of providing residential care. When coupled with the strain on the prison systems from the "war on drugs", the threshold for providing residential care has been raised so high that facilities willing to work with modest mental disorders have been overwhelmed by even more profound cases, an. And the quality of care for both has dropped, harshly.
I'm afraid that I'm old enough to know relatives and colleagues with such members. When their need for treatment leads them to self-medicate with illegal drugs, they then wind up snared in the "war on drugs" and "zero tolerance" policies, and become even more difficult to help.