It shows clearly injustice in a blatant way. Whilst it is fine to argue the boys shouldn’t have been messing around in the gym, clearly the five who were not should never have been punished. At least in my days that’s what publications like the little red school book did do . Make you aware that whilst there are rules, you are not there to be treated in any manner a teacher likes.
If students are accountable : then so are the staff.
In my experience we had more problems of that ilk with PE staff than anyone else. I suspect it was because their gym was their domain in their eyes. Many I also guess felt inadequate in the academic environs of the rest of the school.
When we ask the question why bullying was rampant in the system , we should not forget that staff , as well as kids, can and do bully.