The fact is that we put our service members in situations very similar to the ones we put our convicted felons in. Over the past couple of generations we have stripped away the access to local women, cheap booze, and even pornography in the pursuit of zero defects under the guise of puritanical righteousness.
Ever done six months on a ship or submarine? For my first cruise in the Navy my berthing had 150 people crammed inside the square footage of a typical family home. There's lots of gay jokes, lots of very frank talk about spanking the monkey, but very, very, very little sex either gay or straight - at least on board ship. Port calls are altogether different.