It was much more common in hacky sitcoms or before people were trying to write sympathetic gay characters. Because besides being homophobic we're also puritanical about sex in many other ways, homosexuality and promiscuity were heavily connected in mainstream media. The trope you're talking about is a clumsy rejection…