The vast majority of homeless people in the Bay Area are from the Bay Area. https://www.spur.org/publications/urbanist-article/2017-10-2...
There is lots of homelessness because housing is expensive. https://www.noahpinion.blog/p/everything-you-think-you-know-...
Those kinds of stats typically consider people like couchsurfers to be "homeless", which is not what normal people typically consider "homeless".