Just a comment about the "Why do dress codes focus on girls, not boys?" conundrum. Simple reason is, as Rachylou pointed out, boys tend to be much more predicable in their attire. And, it's easier for a male or female teacher to take a boy aside to tell him to pull up his pants if said pants fall to a threatening position on non-existent hips. As a female teacher, I'd just sound like his Mum, but if a male teacher asked a female student to close up a few buttons, he'd be raked over the coals.
The best most administrators can come up with to "equalize" the code is to ban tank tops and inappropriate sayings on T-shirts for males--both of which can apply to either gender. Most boys aren't much fussed by these restrictions, at least in the younger grades.
And, one other story from my days teaching middle school. Most males develop the signs of maturity at an older age than do many girls. One male student I had was the exception in that he looked like an 18 year old male when he was just 13. He was six feet tall, with broad shoulders, a muscular build, and a beard. Older girls kept hitting on him and he didn't know what to do or say. Strangers spoke to him and treated him as if he was a man when he was just a boy who wanted to play with his friends. He was often in tears because he didn't have the maturity to deal with his appearance. His experiences made me realize that growing into adulthood when your outward appearance doesn't fit your inward self can be painful and isolating. Having a "uniform" that signals you are still a child isn't much of a solution, but it can help ease some of the confusion.
ETA: I agree the images and "good girl" remarks were beyond stupid. I can only think it was some administrator's ghastly attempt at trying to be lighthearted which made communicating the expectations for a prom dress in that way seem like a good idea. I also think, after seeing hundreds of well meaning attempts at instituting a "sensible" or "reasonable" code for middle/high schools, that ultimately EVERY dress code is doomed when it comes to enforcing its provisions in a school without a set uniform. Having administrators measuring slivers of girls' abdomens or trying to determine if a "cold shoulder" top fits the no-sleeveless ban is humiliating for both parties.
Dress codes are on their way out, but I'm not sure we've always picked the right target for our scorn.