That's an easy one to answer. The school was doing nothing to stop the bullying, so when confronted with proof of the bullying tried to cover for its inactions by attacking the victim.
Unfortunately, this happens far too often. I'm glad the situation did not escalate to the point where the victim decided that suicide is the only way out; this has happened before in cases where the school would do nothing despite repeated complaints.
I suspect that the actual problem was a white kid being bullied by black kids. The administration didn't want Justice Dept attention regarding disciplining too many black kids, and so decided to ignore it. The recording would make it impossible to ignore, so they decided to "make an example" of this kid.
They have won, even though the charges were dropped. The kid's family was punished by having to pay thousands of dollars in legal fees, plus the stress.
As far as the law, it needs to be changed so that any person may record any conversation he is a party to, for the purpose of legal evidence. Good luck with that, though. Corrupt politicians and bureaucrats will HATE the idea.