A couple of years ago, at my kids’ elementary school, they had to let the teachers horse trade students. Teacher/class assignments were not finalized until like the second week.
Apparently the year before that, one teacher ended up with almost all of the well-known problem students and she basically threatened to quit if it happened again.
(The so-called problem students deserve an education as much as anyone but I can understand the need to balance things…)