I'm unsure of the reasoning, but one plausible reasoning is that if one has been paying taxes to the most local unit (state/local) for the past 10 years or whatever by working at whole foods and buying things with his productive labor, that means that both he may have paid in enough society can help him and still break even, as well as provide some historical basis to presume the investment to help him get housed will pay in dividends in continuing taxes down the line.
One might argue if someone just shows up from afar in SF, you get them housed and their life back together, there's comparably (to the 10 year person) little reason to believe they're gonna stick around to pay back into the system and produce the kind of ROI on the localities investment that whole foods guy may give
I'm not saying this is a "good" argument per se, but it would one that would make sense to me. If someone put a gun to my head and said "figure out how to use taxes, and only taxes, to help the homeless" I would probably rank cities by unskilled income : cost of living, then build rehabilitation facilities in those areas and use a nationwide distributed tax model to offer people voluntary relocation and rehabilitation in partnership with local businesses which is jointly funded nationwide to avoid the situation seen such as in SF where the minute you give the homeless more benefits you get them coming from all around to benefit.
If you give homeless benefits just for showing up it's gonna end up as a race to the bottom, IMO, where whoever is the most 'helpful' sees a landslide of immigration of people needing help, which isn't practical when the load isn't shared. SF locals are probably not going to want to be the ones known as the person that foots the rehab bill for anyone who hitchhikes to town and then merrily walks away never to pay it back as soon as they get their heads on straight.