I’m not sure, but I seem to recall that there used to be ‘special’ classes for the less than cooperative students so that they are not a disruption to the students trying to learn.
That wasn’t the case when I was in school and it still wasn’t the case a few years ago when my child was briefly in public school.
And even if there were special classes, why? Can we make them learn by law? This just seems silly to me. If someone doesn’t want to learn you can’t make them. You’re just using up valuable public resources and tying up people’s time.