This is a sort of a hamster-ball problem. You have a school that is severely underperforming, an children are not learning at all. You have a big achievement gap in the classroom, where a good chunk os students are illiterate. Then we try to solve this with grades, as a way of holding teachers and students responsible and provide a feedback loop. Then the grades inform the learning process, changing everything.

It's an example of a wider problem that I think I've heard it called "legibility." It can exist police departments, for example. You know that half the cops are lazy, so you measure arrests and such. Then cops' job becomes arresting people rather than maintaining peace. All sorts of damaging dynamics play. Even if a measure (eg arrests) might be good at telling you who's a good cop, optimizing for the measure does not necessarily make cops better. It's demoralizing to the good cops, who are now judged by stupid measures.

Schools have this problem and lots of others too. Lets start with the fact that a 6+ hour schooldays for 8 year olds is nonsensical. More hours does not result in more learning. You could halve the hours (double the teacher/student ratio for the same price?), but schools need to be babysitters too. A big group of kids of equal age is an unnatural environment for juvenile humans to interact and learn in, causing (among other things) emotionally turbulent self judgement constantly. Everyone is your yardstick.

Overall, these are problems we hit as we create institutions. I think it's a problem all over the modern world. Our anemic & sanitized work culture isolated from our home life, and the split personality people develop living in these two worlds. The anonymity and isolation of the oversized and transient "communities" we live in. We develop "unnatural" institutions to deal with life in these inorganic world. Formal reviews and targets in a company instead of the normal peer pressures you would find in a more organic setting like a family farm with a dozen workers (or a hunting party if you want to take it that far). We replace school discipline, grading and such with children's innate desire to learn and discover.

I have a hint of a grand historical theory floating around in my mind that I don't understand well enough to articulate:

It's becoming very clear that technology is developing much faster than culture and psychology. Comment trolling and the even more common emotional overreactions and general emotional idiocy of our online selves are an obvious example. But, I suspect it might go much deeper and longer maybe to the paleolithic revolution.

Early civilizations were (we think) these slave societies with god kings and terrible oppression. They had seeds in our natural (even prehuman) instincts for dominance, status, subordination. But, they were really pathological worlds where people couldn't thrive. They built institutions like slavery and priesthood out of the existing "natural" dynamics (say tribal shamans and chieftains) but most of the brickwork was this clunky new stuff barely holding together this new way of doing society: slavery, cast hierarchy… When we think of the "Charles Dickens World" of street urchins, poorhouses, filth and urban poverty we're seeing people living in a newly constructed industrial world with cobbled together institutions and culture.

Organic cultural takes time, generations. The alternative is an engineered culture with its legible, formalizable logic and none of the nuance.

It's particularly sad though, when it comes to small children.