As with Mattes, our hall passes lo these many years ago were actual slips of (yellow) paper that had to be filled out by a teacher, with time, place, and signature. One reason was to let only one or two students at a time go, so there wouldn't be any congregating in the bathrooms for any nefarious purposes (smoking, graffiti, drugs, sex ...) Another reason was not to let students just wander the halls during classtime, which would have required more oversight. (In those days before CC-TV, campus police, and metal detectors ...) You might also have a pass to go to the office, the nurse, the counselor, the library ...
But that was in the upper grades. In elementary, I think we could just raise our hands and ask to go -- but very few did, because it would have made everyone turn and look at you and wonder if you were about to pee or poop in your pants. It wasn't unduly cruel, since there were regular breaks for recess and lunch. A couple of hours isn't usually a strain on anyone's bladder who doesn't have a medical condition. (And you couldn't go to the water fountain either without a reason, so there was no more liquid going in. Requests to go out in the hall for 'a drink of water' in the early grades were usually rightly regarded skeptically as time-wasting, though sometimes granted depending on the benevolence of the teacher.)
Study periods aka study halls are relatively uncommon in US schools -- typically assigned to students who are struggling academically, and typically supervised, with attendance monitored, in a place like a cafeteria or library. Few high school students have a free period in the sense of just being able to do whatever they want to wherever they want to. Students who plan to go to university usually can't afford to waste a single hour of class time; it's hard enough to fit in all their academic subjects as well as 'luxury' classes like sports, music, journalism, or a foreign language. Some students who amass early college credit through AP exams or community-college courses might find themselves with extra time before graduation, but in many cases they would take an internship or a paid job in those hours, to begin paying for the costs of college.
'Pupil' is now chiefly BE vs. 'student' AE, as we've established in several previous threads. Ditto for 'toilet' BE vs. 'restroom / bathroom' AE. I thought everyone here had surely seen one of those threads.