One, what happened isn't "what's coming to her" - students are expected to exercise a modicum of decency and respect in a classroom setting. Whipping it out and peeing in a lunchbox in class grossly violates that understanding. Even if she "asked for it", she has a reasonable expectation of common sense from her students.
Two, I will bet everything I own that there have been instances where a teacher in that district has forbidden a student from going to the washroom during class, and the teacher suffered NO repercussions.
One, you can't expect a student to exercise decency when their teacher (hint: kids are told to listen to their teachers, which this one did) tells them to PISS IN A LUNCHBOX IN FRONT OF THE CLASS. He was given two options, and he took the only one he could (you can't always hold it). How can you be decent in a classroom where the teacher not only disobeys the rules themselves but gives you an insanely rude option and
watches while you do it?
Two, I'd say the kids don't know that that's a district rule. If the kids knew it was the rule, they'd probably either argue with their teacher or at some point bring it up with SOMEONE out of class. Kids rarely go to their parents and say "[teacher] wouldn't let me go to the bathroom." However, since this was such a unique situation, news got out. The teacher was fired for not only breaking that rule, but also...just generally being totally irresponsible about the situation! It's like running a stop sign--most people won't get in trouble for it because no one is reporting them for it and cops aren't around to see it. Teachers aren't called out for breaking the rule so no action is taken because the only person seeing the teacher do this are kids who don't know the teacher is breaking any rule (especially since they see teachers as a pretty high authority figure, and don't question them (they should but don't)). If a murder somehow went by unnoticed, the fact that that person was never arrested for it doesn't mean ALL MURDERS ARE LEGAL NOW.