Since POTUS44 its been mandatory to purchase commercial health insurance and those who cannot afford it have been left with a problem.
I'll overshare a bit but my exgirlfriend was bipolar, she had great care and she still killed herself.
Mental healthcare is a big problem for a variety of reasons and SF and the bay area are a magnet because of how many services are available. I got to spend a lot of time with a social worker in the bay area who dealt with this exact problem, they basically confirmed that people came here for money and services and the success rate was sub 25%.
This is not a problem that tech can solve.
This is not a problem that the homeless industrial complex will solve for a variety of reasons.
This is a problem that govt has to solve, and the govt has more than enough money to figure it out and yet they don't.