Let me just start by saying that I think your position is beyond reproach philosophically.
That said, principals are in the business of maintaining order more than they are in engendering free speech. I couldn't wear my Misfits shirt in PE at military school because my coach was a consecrated evangelical literalist who assumed I was celebrating death by lifting weights in a black shirt with a glow-in-the-dark skull on it. Was he wrong to censor me? yes. Did it ultimately matter? Not really. The shirt inflamed insecurities/aggressions within him, and it was probably for the best I didn't push him to some greater act of censure... say, laps.
By the same token, wearing an US flag on 5 de Mayo, while perfectly acceptable in and of itself, could very easily be taken as a " you" to Latinos. The principal was, thus, probably trying to avert a mess in his/her school by ordering the removal of an (contextually) inflammatory symbol.
I guess I'm saying that on paper, this was a stupid decision on the principal's part, but in context, it was no different than disallowing kids from wearing Misfits shirts (or gang-related sports jerseys). Peacekeeping.