Dumb law/rule that’s obviously only being enforced by someone that shouldn’t be holding that job any longer.
Without more info can’t really say if it’s racial or not. Could just not like the look of dreds. But either way the kid is being singled out by an administrator for one of those two reasons.
I remember when my 4th grade teacher threaten to cut my hair, my dad was alive back then. He had a little talk with my teacher and that discussion ended right there.
Perhaps students at this level are being prepared for career opportunities, & some employers are not open to such choices as long hair for men—particularly those serving food or providing direct care for patients.
Got acquainted with the manager of an auto shop awhile back, & his employees couldn’t wear body jewelry to work as he didn’t want the liability of a facial hoop getting caught on something while the guy worked on the car . I suspect he felt the same about long hair.