I was so used to my oldest son when age 5/6/7 missing playtimes, it never occurred to me to challenge it.
He was very lively at this age, not very focussed on work and was prone to get very overexcited. On the one hand the teachers had a child who wanted to wander around the classroom, chat and fiddle, yet on the other hand detention stopped him releasing pent up energy at playtime. Had someone suggested beetroot's solution - extra exercise - I would have happy.
I didn't get that worked up about my son getting detention, though. I knew the teachers had him all day at school and so could look at things as a whole. If he got much worse in the classeroom after missing a playtime, they would spot it. It would not be in their interests, presumably, to punish him in such a way that made things worse for them. It would not be in my son's interests either. I put my faith in the teachers.
I also accepted that my son's behaviour at school could be very different to his behaviour at home. I had no idea how exactly he distracted his classmates for instance. For this reason, I felt I couldn't assume a school decision to punish him with a detention was wrong. Things went on at school that I knew nothing about. The teachers had years of experience in seeing what punishments worked, my son didn't come back in tears about the cruelty and unjustice it, so I just let them all get on with it.
Had my son been really upset about detention, then that would have been another matter.