Students that lack the skills to be successful in academics should be grouped into trade school classes. Only those that want to be teachers or go to college should be required to study the liberal arts subjects in high school. Those advanced in science and math should be grouped together.
Students should be separated by age as opposed to academic skill. Part of the learning process is inextricably paired with student levels of maturity. Students process information differently as they mature. Placing students in classrooms with children who are much younger or older could actually create an environment of chaos that is detrimental to their learning.
Situational factors come into play all the time in terms of grades.
There is no reason to think that a student who is at the bottom of the class in one year will not be at the top of the class next year, or else three years in the future. Success and skill is not something that can always have immediate, understandable snapshots taken.
The method of having classes for more skilled students creates unequal opportunity and is not accurate. When I was in elementary school, I was placed in a German language class for less-skilled students, even though I got the best grades in the class. It was an arbitrary decision, but it led to the students in the better class (my same age) being permanently ahead. I am aware that the situation usually works the other way around, with the better students being put into the better class. But I feel that the measuring tools that teachers use often fail. Separating students of the same age by skill felt unfair because I was seen as "less experienced", even though the decision was arbitrary. From the adult teacher perspective, they may feel that they are doing the right thing by hand-picking intelligent students. But their perspective is often very wrong.