First, I don't agree with what the school did here.
Second, saying something to only ONE other person can be grounds for a defamation claim, so untrue gossip affecting a teacher's reputation (even if only said to a group of friends) could be a big deal. What if it was a male teacher and she called him a pedophile? Sounds like fun, right?
Third, whether she talked trash about a boss outside of work is immaterial to this situation.
This school thinks that they are the shizzit. They think they are the best in the county and bullshit bullshit bullshit. I guess that they pretty much rule the kid's lives outside of school too, as much as inside of school. I'd like to know why they think that punishing a good student who has had no other issues, good grades, who is talented and happy over something that wasn't said on school grounds, or overheard by a staff member for that matter is okay. It wasn't in writing either, it was a fucking joke at a friend's house. She even apologized to the teacher over and over...and I'm sure humiliated at the same time. She apologized to the principle too. Why take this further?