Years ago, the law was changed to allow mentally-ill but benign or even non-ill people to escape the "snake pits", mental institutions that kept people incarcerated and drugged. This allowed lots of people to recover.
But then Ronald Reagan (as governor of california) cut state mental illness funding.
Now clearly mentally ill people - who needed help - were turned away unless they were clearly "a danger to themselves and others".
Many homeless people are these mentally ill people, and they can't get help (and they can't be forced in unless they are dangerous, which is usually how recovery begins)