Teachers are not all powerful. There are limits to what they can do. Sometimes they overstep. It can be bad judgement, a temper, or inexperience. But many parents and children seem not to understand that kids have a say in what happens to them. They have the right to refuse to do certain things, or the right to do certain things. If a child needs to use the restroom and the teacher withholds permission, the child can go anyway.
Buy this shirt: Baby Yoda Gizmo Groot Stitch and Toothless Fiends shirt