Much of SF's homeless population is not local to SF. Part of the problem with spending money on the homeless is that it draws more homeless seeking those services. And in many cases, other states and cities have "solved" their homeless problem by shipping their homeless to CA. (Texas, especially, is notorious for this.)
Not saying that SF is well-run or not, merely that the homeless problem isn't simply due to the city's response.
The city uses an expanded definition of homelessness that includes people who are "doubled-up" in the homes of family or friends [1]. The survey referenced in the source you've linked counts people dealing with LGBTQ-related issues that, while terrible, aren't what most people think of when they picture homelessness in SF.
The "man shooting heroin on the street" sorts of homeless folks are, in my limited experience volunteering, generally not from SF but some other part of CA.
There really are cities that pay for bus tickets to ship homeless out, generally under the banner of a name like "homeward bound." The reality, though, is that SF is a net exporter under those programs: https://www.theguardian.com/us-news/ng-interactive/2017/dec/...
I mean... that's how the cookie crumbles unfortunately. California is the most survivable climate for the homeless and for some reason people applaud local governments busing the homeless to California - as long as those two factors remain in place it's up to California to fix it.
With that understanding there should be more national funding going toward the homeless issue - and if there's one local economy that could actually afford to fix the problem it's SF.
Land is pretty cheap in Texas. It’s often unrestricted. SF could buy up a ton of land and start building an eco village with tiny homes; robotic organic food production; etc. and start providing services to the Texas homeless population as way to stop them from coming to SF.
Not saying that SF is well-run or not, merely that the homeless problem isn't simply due to the city's response.