This strikes me as the kind of rule that certain schools like to have because they think it makes them look good.
I was mostly happy with our kids' secondary school, but I did think they had some unnecessary rules - including 'short hair for boys'.
I told my kids that nothing's perfect, I didn't like the rule, but as we all liked the school otherwise, we just put up with it - teachers have better things to do than enforce petty rules.
A difficult situation then arose - one of the children's friends grew his hair very long and plaited it into dreadlocks - completely against the rules. The school chose not to enforce its rule, maybe because he was heading for Oxbridge. I told the kids that I would back any complaint or protest they chose to make - they didn't want to because he was their friend, and asked me not to contact the governors! We noticed the rule slipping after that - but still in the 'official' policy.
We were still broadly happy with the school, especially the teachers, but it still leaves a bad taste.