I will do my best, but it's important for people to know that I mean this as respectfully as I can. It's my honest assessment, and I will try to make few-to-no normative claims.
I tend to refer to what's happening in SF as SF-Stockholm syndrome (I do not mean this as disrespectful, only that I don't know any other way to describe the normalization of what happens here). I grew up in Texas, spent time on the East Coast, with a reasonable stint in NYC, and spent just over a year Scotland. I really have never seen the openness and acceptance of severe substance abuse like I have on the West Coast of the United States (not just in SF).
Portland, SF, LA, Oakland, Berkeley, pretty much every major city here, there are areas of the city where serious drug use, and some crime, is effectively just tolerated. SF is particularly unique, because, by a wide margin, it's the smallest in area and most walkable. Other cities tend to be automobile-centric, so non-organized crime tends to stay in small areas of the city (though, from my understanding, this is changing in Portland for the worse).
This is combine with a fairly strong anti-police culture. I don't know the veracity or history, but people here, even perfectly law abiding people, tend to think the police forces are generally corrupt-and-racist, or have a history of corruption and racism. I'm regularly shock that everyone here seems to be disgusted with the police, but nearly nobody has any intention or desire to reform, normalize, or even overhaul the institution. Many seem to see very idea of police as just a bad thing.
Combine this with the out-of-control opiate epidemic, and what this seems to have created is a pretty nuts, but not actually abnormally dangerous, environment in San Francisco in particular. There is little enforcement of any laws, except parking enforcement. When my friends from Germany visited, they were very curious about this "opiate and crime thing" after reading about book about Fentanyl, so as part of their visit, I showed them the open drug markets around midnight at UN Plaza, at Civic Center BART station. They were horrified. It's hard to describe the scene of crowds of people, many just shuffling around, obviously high, often with pretty obvious other complications from living in squalor.
I call it Stockholm Syndrome because people have genuinely convinced themselves that this is normal. People here legitimately believe that leaving anything at all in your car, even small things, in any major city in America, will likely lead to a break in. Obviously this is incredibly untrue, and SF is an outlier in theft (to the point that the stats are laughably inaccurate because nobody even reports car break-ins to the police anymore), but people have acclimated to the culture, and just assume it's normal, if they don't leave the region on a regular basis.
Ironically, the city is actually fairly safe with regards to violent crime. Not especially safe, but the homicide figures show that things aren't "out of control" in the violent crime aspect.
The thing that's shocking is how in-your-face it all is. The signs of severe substance abuse, are ever-present in a shockingly large amount of the commercial districts of the city (though most of the city is perfectly safe, quite and residential). The city does absolutely nothing about it. They do not mandate addiction treatment, because, for the most part, the people with substance abuse issues never see a court room. Primarily, because the court system cannot handle the case load. My roommate is a Public Defender, so I'm acutely aware of the backlog of cases that are genuinely violent crime. Not that it matters, because in election-after-election, the candidates tend to be pretty much on the same page that nothing really will be done. Again, much of the populous has a very strong distaste for any policing action. I honestly believe that most people here legitimately don't like the idea of forcing people into treatment if they don't want it.
It is incredibly complex, and I've only just scratched the surface of the nuance in what's happening here. There are housing issues, inequality issues, nativist issues, agency issues, and even a bizarre idealization poverty and squalor. To cover everything would be more appropriate as an hour-long discussion over drinks at a bar where you can see what's actually happening with your own eyes, because I think most Europeans would be quite speechless at it all.
This tragedy did not happen in a bad part of town, and I honestly walk through worse areas at similar hours regularly, and it's generally fine.