Uni courses have set grades.
Mine was AAA (3 A grades)
Before you leave school you sit exams called A-Levels. 3 or 4 subjects. You get graded and those grades if they meet your course requirements enables you to start your uni course in september of that year.
Some course requirements like Pharmacy for example may request e.g AAA which includes Math and chemistry.
It was mandatory in my grammar school for the first year, then you could continue it on or pick from either spanish or german.