If we start with the example you outlined, it's easy to decry involuntary commitment. I have seen situations and read stories about others that would fit your scenario.
But I have also talked with families of individuals who were unable to take care of themselves, or who had already acted violently against others where I think that both society and the individual are improved by involuntary commitment. I have also worked with individuals who were involuntarily held when manic, or psychotic, and were later in a calmer and more rational state, where they felt it had been helpful to be contained when they couldn't control themselves.