Having gone through school and now being an adult, I know full well that normal kids only need one or two bathroom breaks during the day.
I also know that there was a large group of kids, generally poorer performing students, who used "bathroom break" as a get-out-of-class-for-10-or-20-minutes each period as a freebie that they will always use.
The teachers aren't dumb. They know which kids are abusing the system. And they know these kids will shamelessly look you in the eyes and say "I have to take a shit, I must go to the bathroom" and then go fuck around for 10 or 20 minutes.