This sort of thing happens in the UK too, if a young persons hair is more aligned to their culture, and not school hair policy then some end up in isolation.
I really don't see how ones hair style has anyting to do with education
Clearly in a science lab or machine (e.g woodwork, metal work) environment, then hair should be secured. but that is purely and mostly for safety, long hair getting entangled in machinery can cause serious injury or death, however that is a slightly different issue and if explained correctly people understand.