Back when I was in high school, it wasn't uncommon for teachers to use the same restrooms as the students. I can't quite remember but I think there were only a couple staff toilets on the campus, one in each gendered locker room and one in the front office.
Anyway, my point is there's at least the possibility that the principal was just using the bathroom normally and the poor kid was being... less than subtle about what he was doing in the stall.
This is the best article I've seen yet on the topic. It does mention the "how" in brief, but this analogy really explains the "why" Gonna bookmark this in case I ever need to try to save another friend or family member from drinking the Flavor-Aid