School limits student bathroom breaks. Too cruel?

One of my pet peeves: school policies that treat kids like prisoners. Here's the latest one that seems way too strict for students whose only crime is being under 18 and having a bladder.

At Evergreen Park High School, in a suburb of Chicago, students can only use the bathroom during class three times per semester. Any more than that and they've got to make up time lost after school. That's three mid-class bathroom breaks every four months, or detention.

According to the school's principal, the policy is designed to ensure kids get the most out of their class time. Fewer students excusing themselves mid-lecture means fewer distractions from the lesson at hand.

That makes sense, but how do you account for the internal distraction of having to weigh whether nature's call is worth the expense of your limited bathroom privilege. It's the kind of debate that could take up all the room inside your head designated for learning trigonometry.

Also to keep track of each student's bathroom breaks, I'd imagine they'd employ a bathroom sign-out sheet. Signing out in front of the class to go sit on the pot? Might as well make students wear a t-shirt that says 'I have gas' too. Remember, everything is mortifying when you're a teenager, especially bodily functions. It's likely most kids (or at least girls) would rather hold it in than make a big fuss about it in front of their peers.

And what about students with special health issues who require additional bathroom breaks at random? Do they have to get special permission and if so, will they have to suddenly make that information public?
There are so many more obvious reasons, besides bathroom breaks, why kids aren't learning as efficiently and effectively as they could be. (Over-crowding? Lack of funding for educational resources and facilities? Zombie-fyingly unhealthy lunch food?). Why are solutions so often more like punishments for students?

Related:
The most extreme school punishments
Teacher bans 'bless you' in class
Florida schools ban 'extreme' hair and makeup
Why won't schools serve water at lunch?