Life is full of incredibly arbitrary criteria that actually make sense in terms of someone else's workflow. You don't know that workflow, you're just given rules to follow. It is best to follow those rules, no matter how stupid they are.
I realize that sometimes we just have to follow arbitrary rules, but the attitude of, "keeping one's head down," is not how change happens.
Do you know that the teacher had not clearly stated to the class what the penalties would be for the wrong paper size?
In either case I can see the teacher acting as described. And wouldn't fault the teacher for doing so. If, indeed, the teacher was enforcing an arbitrary rule which had not been clearly communicated, then I would fault the teacher. But I suspect this was not the case. The rule was present and the kid was supposed to know it, but forgot.
I understand the value of 'gaming the system,' but the size the paper used for a math assignment is probably something that didn't get a lot of emphasis when the teacher was assigning it. That said, do you really want to sit back and 'game the system' rather than trying to improve it? Such arbitrary decision-making on the part of the teacher really detracts from their effectiveness. Not only that, it just sounds like something that is teacher-specific. I doubt that the school as a whole is trying to reach for some overriding goal that is served by punishing children for using the wrong sized paper on homework assignments.