Where do homophobia and transphobia come from? Many people point to religion as the root cause. But the belief that religion is to blame is a reworking of an old argument first fought out in the 1840s.
Then as now there was an argument about where awful ideas come from and how we can change them. It was not Richard Dawkins who first said that "religion is the root of all evil" but the philosopher Ludwig Feuerbach. It was against Feuerbach's ideas that Marx and Engels first formulated their ideas of historical materialism.
Feuerbach was part of a movement analysing society and looking to change it. This movement, the Young Hegelians, was a radical offshoot of the philosopher Hegel that seized on his method but rejected his conservative conclusions. Feuerbach argued that it was religious views that degraded humans, by holding up illusory ideals such as god and heaven set over and against humankind and the material world. So, for Feuerbach it is ideas that create society.
Marx was initially a pupil of Feuerbach but just as Feuerbach had used Hegel's method to reject his conclusions, so Marx built on Feuerbach's ideas to reject his conception of human's relation to religion. Marx put it succinctly in 1845: "Man makes religion; religion does not make man. Religion is, in fact, the self-consciousness and self-esteem of man... Man is the world of man, the state, society. This state, this society, produce religion."
Marx and Feuerbach's society was the new world of capitalism that was supplanting feudalism. Everything, including our most fundamental human characteristic, the ability to labour on the world to meet our needs, was being turned into a commodity for sale. Under capitalism labour-power is controlled by an alien power, the capitalist driven by the laws of competition. As a result, argues Marx, religion is "the fantastic realisation of the human being because the human being has attained no true reality... The wretchedness of religion is at once an expression of and a protest against real wretchedness. Religion is the sigh of the oppressed creature, the heart of a heartless world and the soul of soulless conditions. It is the opium of the people."
Most people usually only quote the final sentence and misunderstand Marx to mean religion is the result of false ideas. But taken as a whole, Marx's meaning couldn't be clearer. Society, especially one that alienates our labour, creates religion. Religion does not create society. To abolish religion requires society to be changed, not atheist propaganda as Feuerbach and most Enlightenment thinkers in the 18th century believed.
Indeed, religion has proved to be the most malleable of all thought systems. It has been progressive, reactionary and sometimes even revolutionary. So if homo/transphobia is not the creation of religion and religious ideas are not timeless rules found in sacred books and accepted by gullible masses, what is it in society that creates homo/transphobia?
Understanding the nature and role of the family in capitalism's development is the key. Across the world and across time family types vary and change. The first factories sucked children and women out of the home and into the factory, destroying the existing family and with it the prevailing gender roles and sexualities.
By the end of the 19th century the destruction of the family was recognised as a problem for the further development of capital and there was a concerted effort to reconstruct the working class family in a form suitable to capital. This was the nuclear family, that ultimate privatisation of the crucial task of sustaining workers' labour and producing the next generation of workers. It was then that the homosexual, an outside threat to the nuclear family, was defined and oppressed.
In other words the root of LBGT oppression is the family moulded to capital's needs. But as capitalism develops and changes so too does the family change. Along with this come struggles over gender roles and sexuality. During the Second World War, women were trained to work in jobs previously seen as men's work. After the war there was a drive to get women back into the home. All this led to a reshaping of the family and what was considered "normal".
Later in the 1960s, the pill, the entry of women into the workforce on a mass scale and major struggles forced further changes. The family, and with it LBGT oppression, changed again. None of this had anything to do with religion. It had everything to do with the class struggle and the needs of capital. Religion can, and often has, played a role within capitalism as both its justifier and sometimes as its critic, but it is not the root of the problem.