Well, this has been a problem ever since women were allowed to work in the military in any capacity. When my husband was in, right before every deployment, there would invariably be more than one woman on his ship who got pregnant. They were simply not deployed and continued to work on base until they reached the point in their pregnancy where the rules dictate you can no longer work. From what I understand, these women were redeployed after a certain period of time, something like 6 months after birth, IIRC. Women who get pregnant while deployed are likewise sent back home, but a Navy study has shown that loss of work time from pregnant women is no higher than loss of work time from men, who are often out due to disciplinary issues or non-service-related injuries. So it's not even clear that losing pregnant soldiers is a major contributor for loss of billets. And for what it's worth, there's a serious stigma attached to getting pregnant, since everyone automatically assumes you did it to get out of deployment or go home, and there's pressure to terminate. Which leads me to...
It gets more complicated when you look at the politics of public money and reproductive health. It wasn't until 2010 that the DoD made the morning after pill available in all military hospitals and clinics, and it wasn't until a few years ago that the Navy started making a serious effort at providing sex ed and services to its soldiers. In the past, access to contraceptives was a bigger problem, especially for deployed women. To make matters worse, the laws prohibiting use of public funds for abortion services except in case of rape, incest, or a life-threatening complication have put deployed women in bad situations. Military facilities are barred from performing abortions, regardless of who's paying, and servicemembers can't use Tricare to pay for it at an outside facility. Even if they could, it wouldn't be exactly easy for a woman stationed in Afghanistan, for example, to hitch a ride to a private medical facility for an abortion. So it seems to me that if there is a serious concern about pregnancies interrupting military operations, then there's still a lot more that the military can do to mitigate some of these problems.
Anyway, sorry for derailing, so to tie it all back, I agree that the military needs to be able to set certain standards and that people with certain medical problems may never be able to fulfill their duties. I'm not convinced a history of simple depression justifies keeping someone out of the military altogether and I think that some issues can still be reasonably accommodated. But given how competitive HPSP is, I don't think it's wrong for them to have super strict criteria. They are footing a massive educational bill and they are ideally looking for someone who truly wants a lifelong career in the military. To me, that's pretty different from just showing up at a recruitment office and enlisting.