I think there is a culture of "but people need to deserve it", and I guess because housing is so expensive in San Francisco it might seem like it's unfair that homeless people get free housing whereas someone with a job needs to spend 50% of their pay in housing. But if you want the problem to be solved, this seems to be way to go about it.
Of course, governments need to also provide programs for reinsertion and rehabilitation, but people need the stability while they recover which is a process that will be full of ups and downs. For these people any barrier might be too high. So I think the rest of us need to come to terms with "giving away free stuff", that's just what works.
Free housing for the homeless, no strings attached.