Banning phones is simpler, and has no downsides. You are at school to learn, you don't need a phone or tablet for that.
Besides, lots of things can be addictive and distracting. Personally I'm addicted to reading news. Had smartphones existed when I was a kid, simply banning social media and games wouldn't have been enough.