It's not very hard to hold yourself for an hour. I believe that students should be allowed to go out and pee if they don't ask regularly, but this kid might have been a troublemaker and ask to go peeing nearly every hour. If he wasn't a troublemaker and actually couldn't hold, he would probably pee his pants. He probably did it to show his disrespect to the teacher.
For all you know, the class might have taken much longer than an hour. And if you REALLY have to go, it IS hard to hold it. When I've gotta leak something fierce, I find it hard to hold for even ten minutes, let alone what could have been two, maybe two and a half hours. When I was in sixth grade, we had class straight from 8 AM to 11:30. We got half an hour lunch, then we had another two and a half hours of class. He could have the same deal, you know.
You don't know that he did it to disrespect his teacher. Granted, I don't know he DIDN'T, but it seems sort of stupid. It would be more disrespectful to disobey authority than to deface their property under their orders. He did what he was told, the teacher didn't. Why?
District Rule: LET THE FRIGGIN' TURDS GO TO THE WASHROOM.
Teacher's Action: Disallowed the kid to go to the washroom.
Teacher's Choices: Hold it, or use the lunchbox.
Kid couldn't hold it. He used the best option at the time: empty your bladder. Teacher told him to use the lunchbox, so he did. He followed orders. Granted, the teacher gave the orders by going against her duties, but that doesn't make it the kid's fault, that's the teacher's for blatantly disobeying protocol.