The most amazing bit of commentary I have read on the subject was in Saturday’s WaPo. Aaron Belkin wrote:

In 1919 the Navy hired “decoys” to frequent the lobby of the YMCA in Newport, R.I. Orchestrated by officers at the local Naval Training Station, the cleanup campaign sought to eliminate gay men from the ranks. Following an introduction, decoys would accompany their suspects to a hotel room and then have sex. At least three dozen sailors and civilians were arrested, and many ended up in jail.
According to conventions of the day, if men confined themselves to masculine behaviors and sex roles, they could engage in sex with other men without inviting accusations of being gay. Because perversion was seen primarily as a function of effeminate mannerisms and passive sexual tastes, government decoys could have sex with gay men with impunity as long as they assumed the active position during those encounters. Or so the Navy assumed.
When the 1919 sting operation ensnared a local minister, the Episcopal Church fought back, and what had been a local operation became a national scandal that almost ended the burgeoning political career of Franklin D. Roosevelt, who was then assistant secretary of the Navy.

I didn’t know any of this.