Hear me out, I am not a heartless bastard.
The social services provided, combined with milder weather, make SF a better place to be homeless than other areas. Surely homeless people, just like the rest of us, are attracted to cities that serve them better.
If you built every homeless person a house I don't think there would be any less homeless on the streets of SF. Homeless in LA who desire a house would simply migrate to SF. A Greyhound bus ticket is not that expensive.
So until you find a solution to homelessness in the entire USA, or at least the Western USA, I can't see any one city solving the problem (as opposed to moving the problem to a different city).