Most European countries also allow involuntary psychiatric treatment and admission, while the US does not.
If you started forcibly hospitalizing the mentally ill homeless in SF you would "solve" the issue pretty quickly, but that goes against some core American values.
The US used to be like this, and changed somewhere in the 1980s. It wasn't because of "core American values", it was because of the removal of funding.
There was widespread abuse and the expense kept going up, laws were passed that curtailed involuntary commitment (based on civil rights, not expense), and we are left with what we have today.
If you started forcibly hospitalizing the mentally ill homeless in SF you would "solve" the issue pretty quickly, but that goes against some core American values.