High rents -> Homelessness -> Debilitating mental illness -> drug use -> even worse mental illness.
Nowhere has rents quite as absurd as SF but what you describe has happened to me in London.
Reducing homelessness and ever rising property values are not compatible goals.
It hasnt been going on as long and isnt nearly as bad in Munich as it is in SF but the same problem is there.
A key word is visible. Some places solve the problem by hiding the homeless, chasing them to poor neighborhoods or into shelters, etc. (It's the same solution suburbs and small towns use, in a way: Bus them to the city. Then they criticize cities for the homeless problem.)
It could be a coincidence that SF has an epidemic of mental issues and sky high rents.
(although it seems to have gotten slightly better over the past 5-6 years)