Yeah, the reason modern military uniforms include the option of skirts for women is that less than 100 years ago it was fairly scandalous for a woman to wear pants.
Same with the hats: 60 years ago a proper gentleman wore a hat in public, so the military includes a hat in the uniform, and expects it to be worn.
The military is a little slow to change, but change it does.
And I doubt you'll find a Coast Guard crewman in a skirt on a ship
. Just as I doubt you'll find a member of a Highland Regiment wearing a kilt in combat.
Dress uniforms often include features that make them impractical to work in: I believe the men's Dress Uniform in the first season or two of TNG was a below-the-knee-length dress (over pants). In later seasons, it got shortened to mid-thigh.