Exactly. Stupid decision on the part of the teacher.
I live in the town of Farrakhan and Jackson so I am more than familiar with knee-jerk “RACIST!” outcries.
This was a bonehead move by the teacher. But I think it points out a difference in what is true racism versus what is perpetuating a nasty stereotype. Racism harbors intent/contempt. I don’t know the teacher or principal, but I doubt it was done with intent to harm.