Have you ever heard of The Lavender Scare?
The Lavender Scare was a moral panic about homosexual people in the United States government which led to their mass dismissal from government service during the mid-20th century. It contributed to and paralleled the anti-communist campaign which is known as McCarthyism and the Second Red Scare. Gay men and lesbians were said to be national security risks and communist sympathizers, which led to the call to remove them from state employment. It was thought that due to the stigma around homosexuality, gay people were vulnerable to blackmail, which could lead to a breach in national security. Lesbians were at less risk of persecution than gay men, but some lesbians were interrogated or lost their jobs.
https://en.wikipedia.org/wiki/Lavender_Scare