I've said before that a non-prison place for mentally ill folks to be cared for isn't a bad idea, but Jam is has a point that those places, and entry into them, end up being pretty abusive in actual practice.
In general, a large part of the issue has been that the people who decide whether someone can leave have a vested interest in one answer or the other, either because they make more money by keeping them in, or (as has been seen with a few drug rehab facilities) their insurance runs out and they're suddenly miraculously cured. There needs to be a 2-3 layer system of independent review and/or appeal on any involuntary confinement, bringing in unbiased professionals, and holding the facility accountable if it's found to have held someone an excessive time, or kicked them out when they were still clearly far from ready to return to society.
At the same time, courts (and the state laws they're applying) need to reflect society's need to be protected from these people. While I think the local court did all it could in the case of Brandi Todd's attacker, giving a maximum sentence without parole and maximum fine, without credit for time served in a mental hospital until he was deemed fit to stand trial, the simple fact is that a 20 year maximum sentence for AADW isn't nearly enough; hell, you can get the same for theft over $100k and theft over $200k opens a 99 year maximum. While I don't necessarily disagree with the theft penalties, (after all, stealing $200k, or even $100k from most people means taking the product of several years of their labor - effectively retroactively enslaving them for the period they spent earning it) intentionally causing disabling, potentially fatal injury to someone should come with a strong possibility that you will never be allowed to return to society.
I think in this day and time we should not be giving BigGov more tools to use against us.
In general, I'd agree, but with proper independent unbiased review of its actions, and full accountability for all involved, abuse of the tool becomes far less likely. In fact, by setting a precedent of review and accountability, one could then work to expand that to handle the abuses currently happening of government's existing tools.