But the flip side of that is that the reason that the military is having such a big manpower problem is that the service environment has become much more hazardous. So, why aren't more service members choosing to opt out? Note that I'm not suggesting that people lie to avoid service. We have a military of about 1.4 million with roughly 200,000 personnel deployed in Iraq and Afghanistan. Even if we assume that only 1% are gay, that would still translate to over 2,000 discharges a year. Add that to the peacetime base rate of about 1000 discharges a year and you get about 3,000 discharges. So, we're missing about 2,000 discharges.
So, it appears that soldiers who could easily place themselves out of harm's way are choosing not to. Why? My best guess here is that it's for the most honorable reasons: loyalty to their comrades and commitment to getting the job done. Bravo.

I'd like to express my gratitude for the fact that this posting was much less yucky than I feared it would be on reading the title...
Perhaps "telling" puts you in immediate harms way. http://en.wikipedia.org/wiki/Don%27t_ask%2C_don%27t_tell#History indicates that suspected homosexuals have traditionally been beaten by other soldiers. I don't know to what extent this still goes on, but even far less (e.g., teasing, shunning) might prove too high a fairly certain and short term cost to bear vs. the longer term and fairly low risk of getting killed or injured over the course of active duty in Iraq.
High "telling" costs seems a more likely explanation to me than loyalty and commitment. Even if these motivate the vast majority of soldiers there ought to be a substantial number that would get out if they could without paying a high price.
Hmm... But why would the cost of telling be getting worse?
Could not the decrease in discharges be solely due to the military being more loath to discharge people? If the discounted cost of telling was already higher than the discounted cost of serving out one's term then an increase in the cost of telling would have no effect on the decision to tell. Only decreasing the cost of telling or substantially (I'm guessing) increasing the risks of active duty in Iraq would cause many people to switch from non-tellers to tellers or even false tellers.