An 11-year old girl was pulled out of class and forced to change into borrowed tracksuit trousers after her flowery leggings and jumper dress were labelled a "dress code violation". Bella Jones, a student at Lansing Middle School in Kansas, was told that her outfit violated the code, which states: "Clothing that is revealing or is suggestive may not be worn."

But who gets to decide when an 11-year old's clothing is "revealing or suggestive"?

And just what is it exactly about an 11-year old's fully covered legs that is considered so outrageous and dangerous as to merit removing her from the learning environment and humiliating her in front of her peers?

In addition to being given borrowed trousers to wear, Jones was told that she was not allowed to contact her mother to bring her a change of clothes. She decided to text her anyway, writing: "I got dressed coded [sic]. I wore leggings and they said my shirt wasn't long enough. So now I'm wearing sweat pants. But you can't bring me extra clothes to wear. I want to move now. Can we please move?"

When Kimberly Jones, Bella's mother, arrived at the school, she found her daughter in tears. She said: "I was told that the reason behind this is that 13-year-old boys can't control themselves around this type of dress — two different [school] staff members told me that!"

If a school is ready to force a child to miss lesson time because of the type of fabric she has chosen to cover her legs with, you have to wonder why the same penalty isn't being applied instead to the boys causing problems by being "unable to control themselves". But it seems that children in Kansas, as well as many other schools across the US and here in the UK, are learning early that girls pay the price for boys' bad behaviour.

The school's community relations co-ordinator Ninevah Carvan said that in future parents would be called sooner, but that the reason pupils weren't allowed to call home was to minimise time spent out of class waiting for them to arrive. She added: "It is not intended to be a punishment in any way, fashion or form. They just want to make sure when students do have a dress code violation, that they can quickly return back to class."

Perhaps an even better way to maximise classroom time would be to prioritise 11-year-old girls' learning over policing their clothing choices in the first place.

Kimberley Jones/ Facebook

The problem with sexist school dress codes is that they are the adolescent manifestation of a much wider societal problem. Whether or not strappy tops are allowed, or leggings are banned, might seem like an unimportant issue on the surface. But the reasoning provided is often deeply sexist. When girls are told they can't wear tops that show any bra straps, it immediately suggests that there is something sexual and inappropriate about an item of clothing they are already pressured to wear from a very young age.

When skirts are policed for ending above the knee, it informs kids of 11 or 12 that there is something dangerous and sexual about a girl's knees, but not about those of her male peers. And when, as in so many cases, the reason given for girls being banned from wearing a particular item of clothing is that it might distract boys or lead to harassment, then young people are learning that a victim is responsible for "protecting" herself by policing her own body. This narrative is enormously damaging for young people of all genders, insulting boys by suggesting that they are unable to prevent themselves from harassing, and promoting the idea that girls must always avoid "asking for it".

Many school dress codes also create rigid gender norms, with boys often banned from wearing skirts or having long hair, and girls prevented from wearing trousers, which can also be hugely unhelpful for transgender or non-binary young people.

These codes take effect at such a young age that children learn what is "normal" from them, particularly when they are promoted by authority figures like teachers in settings like schools. Whether intentionally or not, they take our objectifying, unequal, adult societal attitudes towards women's bodies and project them onto little girls.

At age 11, Bella Jones was considered old enough to be judged and treated according to a sexist society's sexualised notions of adult women's bodies. She probably never thought twice about putting on a pair of leggings before. But what will she think about herself and her 11-year old body the next time she reaches for a pair? That's a lesson that's very hard to un-learn.

If there's one piece of good news, it's that young people aren't taking it lying down. After Bella's case caused controversy, the school quickly released a new dress code specifically banning leggings, but she and a friend have already created a petition to overturn the new rule.

She says: "People are saying that I wasn't telling the truth and that I knew this was a rule – well, it was also once a rule in this country that women couldn't vote! That doesn't mean we give up on a good fight."

Laura Bates is the founder of the Everyday Sexism Project and author of Girl Up