WTF is wrong with this school????? You should be asking why a society would allow someone with clear mental issues to roam free. The kid was a time bomb set to explode.
At some point in education, the need to protect an individual will be balanced against the protection of society, i.e., a school community. At least, I hope so. This is craziness that we endanger tens of thousands to protect the rights of one.