As Lon stated, we very rarely commit anyone does not meet specific criteria. I've been a CIT officer for many years and there are specific reasons we commit over not commit. Sometimes they are still out just as fast because they know how to game the system and the doctors. The doctors don't know how they were acting outside in front of us, all they have is a piece of paper with a few sentences on it from one or us, that against a live person in front of them clearly acting differently may push the doctors into a different direction.
We've had incidents where we commit for suicidal behavior, like literally trying jump off a bridge, run into traffic, take pills to OD and once even try suicide by police. The doctors let them go after they act through any questions and then commit suicide very shortly afterwards. "Shit happens" is what I've been told in these circumstances, which just means the doctors didn't believe what we wrote and that's why what happened, happened.