Well it is is pretty obvious to me that in day to day practice women were kept out of the army because (as sibling poster) they are physically worse fighters than men by raw strength. But it is also pretty obvious to me that over the centuries brilliant military planners would have regularly thought about using women on the front lines and then rejected the idea for much better reasons than 'I'm a sexist'. The stereotypes here aren't arbitrary, an unbiased thinker would have reasonably reached the same practices.
And we can't really say for certain that what everybody thought was controlling what happened. What everybody thinks and what actually happens in, eg, banking and finance are completely different. The people in control are not the people talking on the street.
> More broadly, if you see women primarily as baby machines, then military service should be the least of your worries when it comes to fertility.
Call me old fashioned but I'm ruling out the idea that men are the primary baby making engine of humanity.
On your actual point; the fact that there are other things to think about doesn't stop people thinking about this specific thing. The US lost 400,000 servicemen in WWII without really even seeing a foreign invasion; those sort of numbers absolutely should involve someone asking the question 'who can we most and least afford to lose?'. The militaries of the world are not warm and happy-go-lucky organisations. They ask quite unpleasant questions all the time.