In the US schools I'm familiar with, it's "not required" kind of like how it's not required to attend meetings at work. Nobody's forcing you, but it will be noticed and there will be consequences.
What sort of consequences? I'm guessing the US got rid of corporal punishment, and since it's optional, could they give like detention and stuff for it? Or is this more about being bullied/similar by peers?
Also the US did not get rid of corporal punishment entirely, the south still has it in some places. https://en.wikipedia.org/wiki/School_corporal_punishment_in_...
At least in the US, teachers and administrators are given rather broad latitude to treat students differently, without requiring justification and very often based on their own personal biases and prejudices.
If one's ideals fall over so easily, what would happen in the event of an actual serious attack on those ideals?