The main issue is the curriculum and exams emphasize this kind of rote learning (across the board, not just in maths: one stupid reason for this is many of the markers for the exams don't actually have any qualifications in the subject they're marking and need to be able to just pattern-match off a mark sheet). And because teachers and schools are judged so heavily on exam results, they are not just incentivised but basically forced to 'teach the test' as opposed to trying to get the students to actually learn anything, even when they are otherwise motivated and capable of doing so.
I went to a quite high-performing school, and it wasn't unusual to have a year be 60% 'getting through the curriculum', 20% 'teaching interesting things about the subject', 20% 'exam prep', and that 20% in the middle only existed because of the extreme priviledge of both students and teachers good enough to keep up with that pace and a level of enthusiasm for the subject which allowed for teaching stuff 'not on the test'.