When I attended school it used to work like this:
Any person with an average mark of below 50% across all subjects failed the year.
If you failed more than three years in either primary or high school, or if you reached the age of 21 while still in school and not in your final year, your state-sponsored schooling was over.
After failing twice the kid usually got some psychometric tests to determine if he was retarded or not and, if so, was placed into either a class for "slow learners" or a school for such.
Testing and other evaluation was done by the school, with a government exam at the end of the final year of high school (similar to the UK's A-levels, don't know if the USA has something like this).
In short, if a kid failed, it was on him - he was considered either lazy or stupid. If said kid averaged 10% in a subject, that was the mark on his report.
In 1995 the then Minister of Education decided that the school system was "outdated" and would be changed to become more like the "immensely successful" US system "which gave the world the motor car and the space programme".
I'm not sure how closely these changes resemble the actual US system, but this is what we got:
The changes that were made were:
You now passed at 40%, at one stage it was even 35%.
The number of compulsory subjects increased while the number of possible subjects that could be taken was cut to about 10% of what was available previously.
No penalty for failing for scholars. You could technically stay in school until age 30, if you wanted to.
Most of the retards were put into normal schools. This was called "mainstreaming" and would be very beneficial to said retards, because they would have positive social interaction and the normal kids would learn some empathy (I'm fucking serious).
A lot more "standardisation" tests by the provincial education departments "to ensure that all schools are teaching at the same level".
It was made extremely difficult to expel kids. Criminal activity would still lead to continued "education" in a reformatory.
Because teaching was now "child-centred" and "outcome-based", if a child fails something, the teacher or the school were assumed to have done something wrong (what was called "failure to educate"). The child was never at fault.
This led to the exact phenomenon described in the OP. A teacher could only fail so many scholars before drawing his superiors' attention, so only the worst of the worst got failed. The "just scraped through" 41% mark is really shorthand to the person lucky enough to educate that young lad the following year that he's a hopeless case.
Teaching became more oriented towards the standardised testing and less towards actual knowledge of the subject - "write this when they ask that" crap. Obviously this didn't help improve the situation
Too many children failing these tests would decrease a school's funding and draw scrutiny from worthless Education Department drones, while a school-leaver not being able to count to ten and having a vocabulary of under 300 words in his home language had no consequences.
A lot of this bullshit is in the process of being abolished and changed back (for example the "standardized tests" have been trashed).
The main reason for the about-face is that the local universities got sick and tired of wasting their time on students who didn't even know basic high school shit, and basically threatened the government that if things didn't change dramatically they would reintroduce matriculation examinations (entrance exam) for all prospective students and no longer exempt people who had passed the government final examination from taking these.
They also started screening students for more difficult degree programs, especially engineering and law, with aptitude tests to keep morons out.
All of a sudden the government got very interested in getting rid of the bullshit and "Rethinking Education for the Fourth Industrial Revolution" (4th industrial revolution" is a retarded buzzword, means 'computer age')
The fat faggot who introduced this "child-centred" crap also died and his dickriders have moved on, so there's no nobody who's really interested in defending it.