The issue, in my experience, is that you have to compromise somewhere. That means either leaving the higher performers to be bored, or leaving the lower performers not achieving the minimum. Neither seems like a desirable outcome.
Personal experience: I had a great math teacher in mid school; he gathered the best students from the 5 classes in that year in one class and he set the baseline quite high. For the last 2 years half of our class was taking the prizes at all the inter-school competitions in the city and a few of us from the nationals. Most of that class went to the best high schools in the city and most are today great doctors (medical) or scientists. Imagine that did not happen in mid-school and everybody would be an average Joe - that is a loss for humanity, not just for us.
Try to read Ender's Game (the book, the movie is terrible). This is very tough, but if you need great people you can help by creating the conditions to grow them. How many Einsteins wasted their lives achieving nothing and how earlier curing diseases and improving technologies was possible if that waste did not happen?
The compromise is to waste the resources that we have in the name of equality; we cannot make everyone smart, we only can make them all stupid, so let's do equality.
If I'm understanding your story correctly your math teacher did the opposite of what the person I responded to said - he separated out the high performers, creating an environment that allows them to thrive and achieve high results. This is great, but what about the ones who weren't picked into the high performing class?
There is nothing saying you can't have good classes for both high and low performers, but with schools that have limited resources it often works out to a poor medium where no one really thrives (hence the caveat of 'in my experience' in my comment).
The ones that weren't picked in the high performing class had the same teacher, but they only studied what was in the standard manual, they did not go above and beyond what they were capable of. At the same time they were not pulling back the ones more capable.