It really doesn't seem that complicated to me. Countries that have affordable housing and jobs don't have this problem.
The link between poverty and homelessness, as discussed elsewhere in the thread, is mostly due to policy choices local to SF and California as a whole that greatly disincentivize building more homes to keep up with demand. I come from a country where (with some exaggeration) it feels like an urban park might have higher population density than San Francisco. There's no reason why one of the most desired markets in the world should be that way, other than through artificially restricting the supply.
> Countries that have affordable housing and jobs don't have this problem.
Very few countries, whether housing is cheap or expensive and whether jobs pay well or poorly, have this problem of people strung about, high in public, engaging in antisocial behavior. Most countries don't turn a blind eye towards drug addiction from a personal liberty standpoint, which I think is quite a uniquely American concept. Most will imprison people for possessing or consuming any and punish with death those who traffic. There is broad cultural acceptance of behaving in this way.
Poverty exists, which leads to homelessness.
This is not because of "local SF and California" policies. Homelessness is a problem in nearly every North American cities, from Vancouver to New York. Large cities in Europe also struggle with it, albeit to a lesser degree.
I'm not against building more housing, but no matter how much you build, not everyone will be able to afford it.
And I don't know where you got the idea that the USA is "turning a blind eye" to these problems. There's no blind eye. The US has the highest carceral population in the world. Cities already spent hundreds of millions on police. The problems are not being ignored, the solutions attempted just don't work.
It's an order of magnitude higher in San Francisco at ~2.5% of the population compared to New York at ~0.8% and Vancouver at ~0.3%. SF isn't the only city with homeless people, but it likely has it to the highest degree, with other undesirable traits like open-air drug use, public defecation, and property crimes.
> no matter how much you build, not everyone will be able to afford it.
That's true, but we should still build more so that more people will be able to afford housing. No policy choice will completely eliminate poverty or homelessness nor reduce it for free without opportunity cost, so as a society we have to make prudent tradeoffs that help the most people for the least cost.
> Poverty exists, which leads to homelessness.
Are you suggesting that we're capable of totally eliminating poverty?
Putting aside arguments of social responsibility and taking a purely self-interested perspective, it's typically cheaper and more effective to provide for these people than it is to lock them up. When there's nothing to take away, enforcement doesn't provide any deterrent and frequently leads to an escalation of behaviour instead.