I think the literal answer is that if you move somewhere else, you can have a home? There's something about the circular logic of "I don't have a home, but I have friends" --> "I can never leave this place with friends" --> "I don't have a home ..." that requires the person to either lack any kind of long-term planning or place a really high weight on their current friend circle. Or maybe I'm just clueless about how hard it is to save social security/disability income in that situation.
I realize this line of inquiry sounds callous ("why can't they just save some money?"), but I genuinely don't follow why somebody with a regular income who's not tied to the bay area by a) drug addiction, or b) a job would put up with homelessness to stay there.