Look up "Willowbrook" and Geraldo Rivera. He did an expose of a NY state hospital that was a literal hell on earth. Unfortunately, one political party saw in it the opportunity to use it as a hammer to push the 'civil rights' of the mentally ill.
Now consider this was during an era when civil rights were still a legit hot topic, but losing steam as most battles had been won.
As a result, tens of thousands of legitimately mentally ill people who actually needed inpatient care were dumped on the streets in the name of civil rights. And naturally the Democrats responsible (and a few left leaning power hungry Republicans as well) were there with a plethora of 'public programs including housing, welfare etc to address this sudden 'crisis.'
You may notice that in the years since, a lot of cities are now in full control of one party pushing many of the same ideas. And it is all but impossible to get someone committed to a mental institution without a massive and costly legal battle.
You may also have noticed that those places have an even larger homeless problem for the wise and kindly city leaders to campaign around/address.
I wonder why...