With movies being on the rise during the roaring 20s, the questionable morality of the film industry caused by numerous Hollywood scandals was brought to the attention of religious and political groups. The set of self-censoring rules was proposed in order to rehabilitate the Hollywood image; the committee was summoned and in 1934 the list of rules about censorship known as the Hays Code was published. Nothing that would "lower the moral standards" of the audience was allowed, meaning that "no sympathy should be shown to the side of crime, wrongdoing, evil or sin"; all the lifestyle choices that were considered unconventional at the time were banned. If a fimmaker were to violate the Hays Code in their movie, a queer villain would emerge, wouldn't they?
Queer coding can be looked at from different angles. There is no debate that queer identities were known and always existed both inside and outside of cinema – as an audience and as writers, producers and actors. The desire to be represented on screen and the desire to portray your identity and your struggles translated into allusions, subtle implications and coding, which could be easily picked up on by the community. Alienation, fear of being discovered and punished, self-acceptance, found family, denied love – all these topics are universal, however, especially close and personal for many queer people; they acquire particular significance when translated in a queer context to a wider audience – it makes people relate to those presumably queer characters.
However, for the mainstream consciousness in the last century anything queer associated with something evil, indecent, thus by association queer coded characters suited well for their villain roles. Unnatural, deserving no pity or mercy, queer coded villains should be scaring the audience with their promiscuous tendencies and the power to destroy all natural and encroach on the only right course of the human existence. Written so carefully to get around the censorship, queer identities carried by antagonists played into stereotypes, thereby strengthening them in the heteronormative homophobic society.