Yes, thanks, now I understand. I think Carl's response, above, explains the most probable scenario.
If we compare your situation to the example you gave, then you're right, it isn't fair. However, the teacher most likely wouldn't be disciplined unless she showed a pattern of discriminating against a particular child or group of children. It's the same with your situation. If you can show a pattern, then you might have something. Otherwise, it may not be fair, but it's not illegal.