I'm finding this endlessly amusing. Geezer that I am, I can testify to the opposite situation: when I was in parochial grade school we were REQUIRED to wear hats, it was part of our uniform to wear a beanie everyday. The beanie was dropped in the early 1970's, so I only wore them for a few years, but my elder sisters wore them all the way through to HS graduation. It used to be a standard part of parochial schoolgirls' uniforms all over the country.
The logic for headcoverings is not the same for men and women, therefore it isn't one of those things that has to be equal. Technically, women cover their hair, while men cover their heads. For men, doffing the hat indoors is a gesture of respect for authority, but for women, keeping the hair covered is intended to be a measure of modesty. More importantly in this day and age, if you universally ban head coverings in a public school you are likely to eventually run afoul of someone's religious beliefs, as Muslim women cover, but so do Jewish boys. I can understand banning brimmed hats in class, but IMO banning hats altogether is overkill -- what is the point?