story
Teachers have many of the same powers over children that their parents do. Power to detain, to punish, and yes to search.
If you're not happy with that as a parent then you can home educate them instead.
Also, your argument is pretty much "if you don't like it just leave". Which is one of the worst arguments for pretty much anything.