...there are laws that prevent the indiscriminate institutionalizing of people. Most of the street people are substance abusers and you just can't throw them into mental institutions.
The others obviously have severe mental problems such as schizophrenia and quite likely have at one time been under the care of family members or mental healthcare councelors. But once they stop taking their meds, they're gone..........
Back in the 70s, they began to deinstitutionalize care for string out and crazy people. This was the start of the whole homeless people thing. Before, you only had the drifters who worked for a while in a place and then moved on.