No affordable housing in SF. No diversity in the downtown core. The warm climate attracts drifters and the homeless.
In part, it's related to the tech industry. SF has a MASSIVE % of the US GDP and so there are residents who are grossing 7 and 8 figure annual earnings. So that bumps up the cost of every commodity. At the same time, techies work from home now. So no one goes into the office to work any more. So the areas around the office towers die. And vagrancy, public drug use and petty street crime increases.
Seattle and Portland do have very similar problems.