Being in law enforcement, I see these problems often, and I can tell you, it generally has nothing to do with LE. When we get an individual that is a threat to themselves or others, but has not committed a crime, in this area they are held on what's called a title 25, different states may have different names for it.
After that, they must be "evaluated" by a mental health physician, within 24 hours of their detainment.
Essentially all a person has to do is act relatively "normal" and tell the evaluator that they are fine, and make it seem like it was a temporary laps in judgement, or they only said what they said or acted how they did because they were under the influence of something. After that, the title 25 is generally dropped, and we must release them, often times with no follow up from the evaluator.
This loop continues until they break the law in some fashion. Then they may be brought in on charges as well as a title 25, or simply just charges.
Once they go to court, if they try to say they are not mentally stable, or if they act mentally unstable, then they have to be evaluated by a state run hospital, in our case. We have had people in our jail for over 7 months at times in limbo, simply waiting to get evaluated. People that very possibly don't belong in jail, but instead a permanent mental facility, and seriously need help, and jail is only making their condition worse. Then once they finally get in for evaluation, who knows what happens. I have seen them say someone was "unrestorable", then the judge says "well, they did 6 months jail time waiting for evaluation, that is likely as much time as they would have done for these misdameanor charges. Release them, time served". With little if any mental follow up. And they are back on the streets, unsupervised, or put on a supervised probation that everyone knows they will fail, because they are mentally unstable, amd are only going to self medicate with drugs and alcohol, which is obviously a violation of their probation.
Then, when they get arrested again a few weeks/days after getting out, the process starts over. But it gets worse.....
They finally, 6-7 months or more later, get back in for another mental health evaluation. The same mental health doctor does the evaluation. The same evaluator that, 6-7 months ago, said this person was "unrestoreable". But on this evaluation, they say this person is mentally fit to stand trial. But again, this person has done 6 months for their crime, which in this case, is sufficient. So they are let go on the streets, again. And again, arrested a week or two later, and again, wait on another mental health evaluation.
The biggest problem is the broken mental health system, which is exacerbated by the fact that they are being inundated with more and more patients due to all the drug use problems in the country, drug problems that are being advocated by certain states such as Washington, California and others, where one can get on disability because they are addicted to drugs, and get paid by the state so they can continue to buy more drugs with their tax payer funded dollars. All the while, law enforcement across the country can't keep their departments staffed, and government ran mental health facilities are functioning sub par due to a lack of proper management, funding and staffing.
Hopefully that wasn't too political, but that is the problem as I see it from where I stand, dealing with people like this directly, on a regular basis.