I'm not a military man, or someone with any military interests, and yet, I've know lots of gay and lesbian military vets, including decorated combat veterans and a MASH nurse from the Vietnam War. I also knew 2 gay Korean War vets. There really are more gay Marines out there than most people think, and I've known a few of them. Most of the gay and lesbian vets I've known were from the Air Force, which used to have the reputation as the most gay-friendly of the services (I doubt that's true now in the wake of the evangelical rampages through that branch during the Bush II Administration). I knew a lot folks who served in Navy and Air Force intelligence, many with much needed language skills. Some of these folks stayed closeted and stayed in. Others decided not to re-enlist when the heat got too close. Still others were expelled.
I think with the American military stretched very thin between 2 wars, and setting a dangerous precedent by relying on mercenaries to make up for the troop deficit, the top brass decided that they needed every man and woman they could get, especially those with language skills.
The military is the second biggest closet after the Church (Wall Street may be the third). The historian Allen Berube in his pioneering account of gays in the 20th century American military, Coming Out Under Fire, noted that in World War II, the US military didn't start cracking down on gays and lesbians in its midst until well into 1944. From Pearl Harbor to 1944, there were few discharges for homosexuality. Indeed, claims and accusations of homosexuality were regarded as either shirking duty or settling scores and were ignored. We forget that in 1942, the USA and the Allies were losing the war, and its outcome looked very uncertain. Everyone was needed. It's when victory looked assured that the crackdowns started.