Yes, you shunt all the disruptive/obstinate kids into class 2 and they can spend 4 hours of math lessons every week rehashing arguments about how they have a phone so they don't need to know what 7x12 is.
This means the students in class 1 get undisrupted classes, learning more and raising their grades.
Because of the way these things are done, it does have the unfortunate side effect that the kid who struggles with math because he's dyslexic gets put in a class with the kid who doesn't give a shit about math. But they'd be in the same even if the school didn't place by ability, so they're not that much worse off.