Women in the military is a really, really complicated topic. It'll take a long post to do it justice; you could easily write several books on the subject.

First, as you have said, the military has always been a male-dominated institution. The first time that we actually started putting large amounts of women into uniform was during World War 2. We took women for clerical jobs so that more men were able to fight on the front lines. The recruiting slogan was "Free an Man to Fight."

The military has always been seen as a catalyst for social change. It's arguable that the integration of black and white soldiers was the first step in the civil rights movement, and the end of Don't Ask, Don't Tell is probably going to be seen as the first step of the federal government ending de jure discrimination of gay people. With this in mind, a lot of feminist lobby groups are trying to do the same thing with women with the exact same goals.

The problem is that men and women are much further apart than these other integration challenges. Black men and white men are culturally different, and there were a lot of problems with integration. I'd say that there still are problems; if you look at a battalion, you'll notice that all the black guys hang out with each other, all the Hispanic guys hang out with each other, and so on. However, everyone is still able to function as a unit. The same is true for gays. I'd say that it's mostly because most gay men stay in the closet for their terms, (lesbians are almost universally accepted) but the repeal of DADT didn't really have much of an effect on anything because a gay man is still basically the same as a straight man when it comes to doing work.

This is not so with women.

Similar to firefighting work, the military is a very physical job. Everything ends up being physical in some shape or form, and it really doesn't matter which MOS (Military Occupational Specialty) you pick, you're going to end up doing something physical as a matter of your daily duty. There are particularly egregious cases where they stick women into Ordnance, but even a job like avionics technician involves doing hard labor (Ha, you thought you'd use a soldering iron all day? Guess your recruiter didn't tell you that you have to take off all the hydraulic lines before you can take the control box out. Have fun).

There's a very clear double standard that is communicated, and it's insidious for several reasons. When a man "falls out" (can't keep up with the rest of the unit) of a run, his life sucks. In my shop, falling out means you just volunteered to run with the master sergeant at 2:00 in the afternoon. It's summer in Arizona, and it's usually around 115 degrees. Not a good time. We have a guy who isn't very good at running; as a result, he gets to run every day at 2:00. He is pretty miserable. He's definitely getting better, though.

When we had a female sergeant, she also fell out every time. The response was indifference because, "well, she's a woman and it's just par for the course that women can't keep up with men." It's also implicit that said sergeant could make the case that the master sergeant is only making her run at 2:00 because she's a woman. The case would go, "Your standard is too high, and you know that I can't keep up. You're being a big meaniehead and you're only making this standard because you're sexist." The master sergeant's career would be fried before you can say "Equal Opportunity." An EO case is a career-ender.

Because this issue can't be dealt with in the open, (it's verboten to say that women are simply not as physically capable as men) you have a lot of people who pay lip service to the "We're all equal" party line but snicker at women in leadership positions. And, sadly, it's justified in many cases. This aforementioned double standard also get applied to promotion along with daily life, and it's a kick in the teeth when you're a lance corporal obeying a corporal who is, by all objective measures, a worse Marine than you. That applies to either gender, but it just so happens that due to affirmative action, there are a lot of women in leadership positions who have no business being there. Couple that with the fact that women make just over 6% of the Marine Corps, (small sample size) and you get sexism.

I don't really feel like going into the sexual harassment / assault part and the fraternization, as that's just shitty behavior that can be remedied by court-martialing people and setting a clear standard. In any case, the real problem is the double standard. If you apply a double standard, then you get sexism. If you hold everyone accountable, then you get genuine respect. Doing so, however, would drastically decrease the number of women in the military. I personally think that's a good thing if it means that the remainder are respected and valued.