I have seen this exact situation.
…
I have seen two different families suffer through this. No matter what they do they cannot fix what is so broken. They end up crushed between the their duties as parents and their duties as human beings. They want as parents to protect and fix their child, but as human beings they must eventually abandon their child to the destructive “care” of the State, if only to protect everyone else.
Why don’t we have anywhere else to put the mentally disturbed than in prison?

Because our mental hospitals were so bad that, rather than fix them, we did away with them. There was little realistic plan for what to do in their place, and still isn’t. So we have a flood of homeless and mentally ill folks in the cities, and parents who are afraid that their broken children will be sentenced to Bedlam, so they keep them at home and pray nothing too bad happens.
Time for a new plan, though I don’t know what it would be.