I live in San Francisco but am familiar with Denmark where it's relatively straightforward for a physician to involuntarily commit someone for ~a month at a time and the state to extend it in six month increments. To contrast, LPS in California limits involuntary holds to 72 hours and makes it very hard to hold anyone longer than that even despite recent reforms.
The same people who pay to keep mentally unwell people housed in residential hotels with inconsistent (but expensive) social worker based health treatments, their ER visits, Medicaid, etc. in the United States. Big cities spend huge amounts per capita on public health. The difference in results isn't explained by the purse.