Prison is for those convicted of a crime by a jury of their peers. There must not only be a criminal law on the books, you must be found guilt by trial.
Involuntary committal involves no laws being broken and there is no jury. I don't know every detail of that process though I am familiar with the general flow, I know multiple people that work in related roles, and my understanding from them is that it is generally not down through a legal proceeding.
I'm talking at a higher level - I'm saying that conceptually, "inconvenience" ranges from mild offences to murder, and society has to decide where to draw some line for inconveniences that it will not permit. If someone is determined to re-offend, regardless of severity, the state's only choices are to either let them re-offend, or to use force to prevent it.
Well, that's what prison is, for some value of "inconvenient".
The problem is that at some point, if someone refuses to abide by laws/social norms, and can't be coerced via fines, etc., then the only options the state, and society has are either imprisonment, or allowing those people to ignore laws/social norms. Clearly some social norms (e.g. serious crimes) we aren't okay with ignoring, so it's really just a question of what the threshold is where we do something vs. allowing people to disregard said laws/norms.
> Personally I've never understood any justification for committing a person without their consent. The line between being committed and being extra judicially imprisoned seems indistinguishable to me.
Presumably the process to commit someone can involve the judiciary, so it wouldn't be extra-judicial.