They relocated to where they are though. A lot, or even most of the people living on the streets of SF are not from SF, or even California for the matter.
They aren't "tech bros" down on their luck either... they're not failed entrepreneurs, or folks who just couldn't afford one too many rent payments.
They're people who chose to be there for many reasons, including the friendly environment that tolerates their lifestyle.