Homeless people move to CA because it has great weather and social services and so its great to be homeless there compared to other places. Homeless people are rational so that's where they go.
The crucial fact, though, is that none of these great conditions in CA do anything to actually get people out of homelessness, they just subsidize homelessness and make it easier to be homeless. So naturally, homeless people being rational, the effect of these policies is to increase homelessness overall.
There are people who are legit mentally ill and somehow as a society we've decided that the best we can do is have them live like dogs, scrounging around and shitting in the streets.
There are other people who just really like heroin and would rather do heroin than anything else and california is the probably the best place in the world if that's what you want to do.
A truly humane homeless policy would institutionalize mentally ill people, not subsidize drug addicts, and help people on the edge of homelessness find jobs and housing.