What happens when you get bad kids that don't care about their grades that distract the good kids and prevent them from learning. Ideally the teacher could bring them all up to the same pace, but at a certain point it's on the parent. In some cases you do need separation. I always enjoyed my GT (gifted and talented, separated classes from 1st grade to 8th) and AP
(dual credit college/highschool 9-12th grade) classes more than others because they moved faster and my classmates were well behaved.
The schools weren't fully separated, the GT classes was one designated class (1st-5th was English, 6th-8th Science).
The AP classes were highschool and college credits and you could choose English, Math, and/or Science.
This was in Texas. Though they no longer do GT classes anymore I don't think. Those were my favorite as a kid though.