Take it with a pinch of salt.
Grammar schools do this to a light a firecracker under a students ass and also to send a message home to parents......it's not an actual reflection of their true grade. But it helps a kid know where to focus their revision and is reminder to parents to keep supporting.
I got a U for biology. Complete fail. It was my worst subject. I got a C in the actual exam, but for me that was genuinely hard work and alot of revision.
For my top subjects - English, History, Languages I was given C's and D's in my mocks. Got A's across the board for them. At the time of my mocks I was probably around a B.
I work in the old system - chances are the teacher knows he's fully capable of a B or a C - maybe he's hovering around a D currently. So he fails him - then the kid goes home, the parents sit on him/get him a tutor etc and the kid puts their head down because they're stressing and then will usually come out with a B or C (whatever the equivalent is).
It's tactical. It really is.
Everyone in my year got grades in their mocks way way way below what they actually got in the real thing.
It is signalling that this is a subject he needs help in though, so you're right to act and don't tell him the above.