I think the point was that "biological sex" is a legal term, not a biological one. Hence the application of the law here, irregardless of what this kid's actual situation is. It's a demonstration of why this law is stupid, and what stupid things a school board has to do to remain compliant.
They're almost certainly not grouping the kid with the girls out of spite, but to avoid being liable for not doing so if someone were to find out this kid is, according to the law, "biologically female". The school has to protect itself from this liability, and thus we get this extreme example of the law being stupid.
But right would also be wrong, because the torso is elongated instead of the neck.
I suppose a giraffe centaur would be considerably shorter than either of these images suggest.