Before I come down on the prosecuter/judge, I want more details on the tantrum, because I can easily picture a scenario where the only choice is to take a kid off to a detention center.
We have several kids around this age at the (residential) facility where I work. Don’t underestimate them- their tantrums are legendary, and extremely dangerous. One child recently sent three trained, veteran staff members to the hospital, tore apart the unit they live on (including pulling over a several hundred pound TV cabinet), and necessitated an immediate change of unit for several kids until we could find suitable outside placement (IIRC, it took about five days before someone agreed to take the child). When I worked in crisis assessment, I had countless kids sent off for 72 hour evaluation, sometimes to the state-run facility which was over 4 hours from where we were located and which is run very much like a detention center. I have no doubt that I was responsible for traumatizing a lot of kids, but I slept just fine because I knew I was doing the right thing.
If this child has had an IEP in place since 2003, that tells me there are additional problems requiring special intervention, problems that have resulted in observable behavioral issues. It is possible that he had a tantrum that genuinely caused the school personnel to think he would hurt himself or someone else; at that point their hands are indeed tied and they have two choices: detention center or psych facility (and most psych facilities WILL NOT take actively violent kids- quite the conundrum).
It is also possible that the folks involved here are fuckwits of the highest order, but I’m not going to say either way until I know more.