Hmmm... so a kid broke a posted rule and is now being punished in accordance with that rule... aside from pupils using this as an easy way to get time off from school, what is the problem here?
The problem is that absurd rules and laws breed contempt for the rule of law, whether they are enforced rigorously, which makes those subject to them contemptuous of all legal authority, or ignored, which makes those subject to them perceive rules and laws to be of no consequence.