I'm a teacher. My DGS is at an 'outstanding' school. I really, really don't like it. Neither does he. Everything they do is to ensure they get another outstanding from Ofsted next time around. Not to help the students. Academically, it's good. He's making fast progress. But there is no room for students who're having problems of any kind to deviate off that progress path. If they do, they're a hindrance. The best schools I've worked in have been graded Good. Not so obsessed with box ticking that they couldn't support children that didn't fit in the boxes.
IF the teacher is giving a detention for less than 100%, it'll be driven by someone in authority, higher than her. Although it doesn't look as if it's a detention. More being kept behind to make sure he can either retake the test OR get support to make sure he does better next time. If all the information he needed was in the knowledge organiser, he should have been able to extract the information into his work and if he wasn't able to, the teacher would check why not.
Y8 isn't really primary though. It's KS3. Year 7 and up can do detention, IF they deserve it. Detentions aren't always sitting in silence, doing lines. My detentions are usually helping out around the classroom, while I have a chat with the student/s. It's a very good time to find out if there are deeper reasons for whatever the problem is that's getting them in trouble.