Women are treated differently then men. Dress codes is just one of the many inequalities.
Although women's inequality has been dramatically improve, it still has years of improvement to come.