That just sounds like lazy teacher discipline in class. Decades ago we couldn't even use calculators on some tests, but now (or up until recently) they could practically have a computer in their hands all class?
Allowing kids to have their phones in class, even if they weren't allowed to use them, was setting teachers up for failure. It's easy to call them lazy, but if you've ever tried to police the phone use of a bunch of screen-addicted adolescents you would understand. The calculator comparison is not a good one.
I encourage you to seek first-hand accounts of what teaching in a contemporary public school classroom is like. Teacher discipline can account for so much.
I commented on this elsewhere, but at least one local school recently simultaneously did the following:
1. Required teachers to have kids turn-in their phones for the duration of each class period
2. Banned teachers from kicking kids out of the class who did not turn in their phones.
Teachers don't enforce the rules here because they don't believe the administration will have their back if they try. They can assign detention for students not listening, but many students don't show up for detention, and meanwhile that student still has the phone.
Teachers are widely hated by the "stupid" class, which is most people. The students are set up for failure by their parents before they even enter the classroom. This has been going on for 50+ years.
When I was in university, I had a math teacher that brought extra chalk to class everyday because if he saw you on your phone, he'd snap a piece off and throw it at you pretty damn hard. Maybe that wouldn't exactly work in a high school but damn if Dr Murphy didn't have me paying attention in that class.
That being called "literal violence" is one thing, but now a teacher telling a student "you should be ashamed with yourself" is also called "literal violence."