When I grew up, there were different classes for the smart kids and the less smart kids. There was a bottom class where the students had all sorts of behavioural issues. Some people just won't learn, and I think it's fair to separate them from the people who do. At least that way, teachers get at least a few classes of eager students.
This was the generally accepted approach nationwide in the past, until we realized it fuels systemic transgenerational inequalities, a bit like economic, racial, residential, etc. forms of segregation.
Putting a hooligan amongst decent people works, but only of the decent people can force the hooligan to behave. Most of the time, it works by just peer pressure, even in the positive sense. But for those who don't yield, a society at large has police. And a classroom does not have police.
So a teacher has a choice: to be a saint (and do miracles), to be the police (with hands tied though), or to be a victim. Sadly, many end up with the third option :(