"A cock has no shame.” That’s what it said on the little plaque on the door of the espionage instructor. He’d been discovered a few nights earlier going at it with a female junior officer on a pool table in the recreation room at “the Farm,” the Central Intelligence Agency’s training facility in the swamps of eastern Virginia. The instructor flaunted his defiance, slightly camouflaged in Gothic calligraphy. Among the students and teachers, even among the more straight-laced Mormons, few thought he’d done anything particularly wrong (except getting caught). We were all adults. Some of the female students aggressively hunted the better-looking paramilitary instructors, who welcomed the attention. In the mostly temporary couplings that occurred during training, it was sometimes unclear who was married and who was not.

What happened at the Farm wasn’t just the by-product of being stuck in the woods for months in boring espionage and paramilitary courses. During my tour of duty with the operations directorate in the 1980s and 1990s, case officers weren’t exactly models of propriety at headquarters or in the field. Unlike the U.S. military post-Vietnam, where senior officers are supposed to be moral role models, the CIA—that is, the Clandestine Service, the engine room of espionage and covert action that has always defined the agency’s ethos—has been much more relaxed about these things.

The drama surrounding David Petraeus’s extramarital affair with Paula Broadwell could change all that. Ever since the agency director’s resignation, a small army of pundits has taken to the airwaves, warning that infidelity could be exploited by foreign intelligence services and used against American officials. The pressure could force new standards for the intelligence world. That would be a mistake. As morally upsetting as it may sound, we should all want the typical philanderer to serve in the Clandestine Service, free from the fear of reprisal.

Let me explain. Case officers, the CIA personnel who handle intelligence-collection and covert-action operations, are bottom-feeders. They search the strengths and weaknesses of character in the foreigners they want to recruit and run as agents; few things are off limits. Unlike soldiers, who have each other’s backs in battle, case officers build on both trust and deceit. And they work in a promotion system that often rewards intellectually dishonest operatives for making a mediocre new recruit seem like solid gold. This sort of thing tends to make officers jaded pretty quickly. Historically, prudes have rarely done well in the institution. Admiral Stansfield Turner, President Jimmy Carter’s CIA director, didn’t have many fans for a variety of reasons—not least because he wanted operatives, and the ops they ran, to be more wholesome. He was too prissy for the job.

When I was in the agency, my colleagues were amused, occasionally disappointed, but never shocked when married officers were discovered cavorting with their secretaries or other co-workers at the office, in parking lots, hotels, and safe-houses—which, of course, are not supposed to be used for trysts. Case officers could get into trouble if their passions led them to keep foreign mistresses no one knew about. The agency maintained an important rule requiring employees to report continuing, meaningful romantic contact. But there was a fair amount of flexibility built in—since operatives, not a sentimental lot, could keep a bed partner for some time and truthfully say that their lovers really didn’t mean all that much to them.