Ok, the entire thing is that the school does not allow weaves and extensions.
It has nothing to do with black hair styles, unless black hair styles require weaves and extensions.
The black girls who got in trouble, knowingly violated the rules.
It would only be racist if the rule allowed everyone but blacks to wear weaves/extensions.
It's a cultural thing. That hair style is just more common among black girls so the policy disproportionately affects them. I guarantee that if a bunch of white men turned this hair style into a popular thing for them it would not be an issue.
Braided hair is not banned under the dress code and not why the girls got in trouble.
Girls of every race use extensions and weaves. The rule doesn't only ban black girls from it.