It's inappropriate to require girls to dress a certain way so that it doesn't affect boys' behavior. That's the same thing as not allowing women in the military because the male soldiers would find it distracting.
Males are responsible for their own behavior, attention span, and focus. Others are not required to alter their dress or behavior to conform with a way that it doesn't interfere with a male's focus, from his perspective. Males need to learn to control themselves, regardless of how girls dress or behave.
Having said that, I agree with the dress code because young girls may tend to dress a certain way to get attention, and they are not old enough to handle that kind of attention that dressing sexy would bring. They are in a school setting and are there to learn. It's inappropriate to show too much skin in a school setting, for either sex. And if only the girls are doing it, that tells you that it's a getting-attention, sex thing. Showing skin can be appropriate once a girl grows up and she's in a social setting. But even then, there will be work dress codes that will require skin covered up. It's inappropriate for a business setting.
It's looking at it from the girl's point of view, what's best for her and the school and the setting. It's not looking at it from the boy's point of view..."you can't dress that way because Bob won't be able to focus in class." You might as well say, "You can't wear the color red, because Bob finds that color distracting."
Also, showing skin and bra straps has nothing to do with the weather. It's actually cooler to wear thin cotton that covers skin; it helps to absorb moisture from the skin, and protects the skin for direct sun, when you're outside.