Teachers are encouraged to differentiate instruction, classwork, homework, projects and tests for students of different ability levels. In the past, my tests have been different for my math groups based on the concepts each group covered. For example, a higher level math group may have learned to solve two step equations and the lower group only learned one step equations, so the higher group's test could have a few 2-step equations to solve while the lower level test would not. Students also get different levels of support on assignments. For example, some students may get the formulas for area and perimeter while most students had to memorize them. Spelling and vocabulary tests are more frequently differentiated by giving different or fewer words. In my opinion, not enough teachers provide a challenge to more advanced learners or provide additional support for lower level learners (without holding other students back), but it is becoming more common.
Math is a particular challenge to teach. Some people have natural abilities in math - they 'get' it and fairly easily. Others - like me - struggle with math - they just don't 'get' it. What does a teacher do when in the same math class there are very gifted math students and also students who struggle with mathematical concepts?
Many schools 'track' math which means students are grouped by ability in their math classes. The strong math students are all in class together and the weaker math students are also together in class - but in a different class all their own. The 'middling' students are together as well. There are often three levels of 'tracked' math classes.
But when a school doesn't 'track' their math classes, math teachers have to find a way to teach math at the same time to kids of very different levels of ability. Giving a harder version of the test to the top students is one of the ways that math teachers can challenge their best students but that same test given to the weak math students - like me - would overwhelm them.
Please know I'm not defending this - I'm just trying to explain it. I have taught math to both tracked and untracked classes. It's much easier to teach math when your students are all at the same math ability level and it's a real challenge to teach math fairly when your class isn't 'tracked' and you have students of very different levels of math ability.