Barely a day goes by that we don’t hear some horror story involving racism: police brutality towards Indigenous people, a refugee dying in a detention centre, another Islamophobic attack or a racist comment from a contemptible politician. Why is it that racism seems woven into the very fabric of society?

Race and racism are relatively new concepts, coinciding with the emergence of capitalism. As English capitalism’s insatiable appetite for cotton developed in the 1800s, a workforce was needed to capture this untapped wealth. Black African labour was abundant and captive. Slavery in the US cotton fields provided the new system of capitalism the kick-start it needed – the beginning of large-scale capital accumulation. Plantations, shipping lines, manufacturers, banks and governments all made their fortunes off the backs of slaves.

“Direct slavery is just as much the pivot of bourgeois industry as machinery, credits, etc”, wrote Karl Marx in The Poverty of Philosophy. “Without slavery you have no cotton; without cotton you have no modern industry. It is slavery that has given the colonies their value; it is the colonies that have created world trade, and it is world trade that is the pre-condition of large-scale industry. Thus slavery is an economic category of the greatest importance.”

But slavery, while intensely profitable for the bourgeoisie, ran counter to capitalism’s ostensible ideology: liberté, égalité, fraternité. A resolution to this contradiction was needed, and came about in the concept of race – the idea that certain characteristics made some groups of people less worthy of rights. The emergence of social and pseudo-scientific theories such as eugenics helped to cement this new concept as supposedly natural and legitimate.

Forging and maintaining new capitalist economies required bloody suppression, and at times genocide. In Australia, the British Empire’s thirst for new colonial outposts first indiscriminately murdered Indigenous people, then coopted them as slave labour on pastoral leases and missions. A policy of “assimilation” throughout the 1900s was a concerted attempt to “breed out the black”, and wipe out language, culture and ties to land.

While the colonial era may be over, imperialism continues to create racialised enemies. After the 11 September 2001 attacks, Australia threw its support behind the US’s wars in Afghanistan and Iraq. Muslims and Middle Eastern people were vilified by the government and media as part of this campaign, repeatedly portrayed as intent on forcing women into headscarves and subservience, unable to integrate into Western society, hostile to progressive thinking and all secretly terrorists.

This racist campaign was calculated to dull opposition to the interventions in the Middle East, while Australian capital reaped the benefits of oil and military control in the affected countries.

Australia’s geographical location creates a tension between the nationalist image of the country and the reality of the geography and population.

Establishing an “enemy” has been vital to the capitalist class’s strategy of divide and rule and to creating a sense of nationalist consciousness to usurp class identification and interracial solidarity.

Throughout the 20th century, different migrants became this enemy at different times. During Irish migration to the colonies in the 19th and 20th centuries, a campaign of vitriol was directed against them. Characterised as lazy, stupid, disloyal to Britain and raging radicals, the Irish endured rhetoric virtually identical to that aimed at Muslims today.

When the White Australia Policy was introduced in 1901, it codified the virtual apartheid that migrants, especially the Chinese, suffered. For decades, being Australian meant being white.

During World War One, Germans were rounded up and dumped into concentration camps. They were deported, fired from their jobs and ostracised. During World War Two, they were joined by Italians and Japanese. Those who managed to avoid this fate were relegated to the margins, working poorly paid jobs and living in poverty.

Governments worried that many of the migrants coming to Australia came from countries with their own histories of class struggle. Many Irish were trade unionists and had fought Britain’s brutal occupation of Ireland, Italians had fought against European fascism, and after the Vietnam War, the Vietnamese came from a country devastated by the West.

Today, it’s Muslims, Africans and refugees who are the prime targets of anti-migrant racism. Vilifying these groups to justify Australia’s involvement in occupation and war has resulted in anti-terror legislation that has strengthened the state’s power to spy and intimidate. If refugees can be imprisoned and brutalised, so too can poor people and workers.

Racism is not purely a social phenomenon; it has a specific economic use.

Societies in which racism is more pronounced have in general lower wages and poorer working conditions. In the US south, historical divisions between black and white workers created a downward pressure on wages for all workers and have contributed to the confidence of the bosses to ruthlessly exploit both black and white workers.

To this day, workers in the US south are the most poorly unionised and lowest paid in the country. Of the five US states that have no minimum wage laws, all are located in the south (Mississippi, Alabama, Louisiana, Tennessee and South Carolina).

This is not a product of the retrograde views of your average racist, but a legacy of slavery, segregation and the prevalence of racism that has weakened the workers movement and held down working conditions.

In Australia, so-called “guest labour”, migrant workers on 457 visas, are often employed on worse conditions than permanent residents, with no guarantee of safety or job security.

Those on precarious visas toil in some of the most exploitative industries in the country. A 2015 expose by Fairfax media revealed that workers at 7-Eleven stores – many of whom are international students – were paid below minimum wage, subject to intimidation, sacked if they spoke up or joined a union and under constant threat of deportation. Racism and national borders make this situation possible – a windfall for the bosses. But it’s a disaster for all working class people, both the migrant workers and those struggling to defend hard-won gains.

Experience of explicit racism often comes in the form of individual racist behaviour or comments. This is objectionable, certainly. But being “ignorant” or “uneducated” doesn’t create or perpetuate the inequalities that keep Indigenous people poor and incarcerated or refugees in camps. It’s not the “uneducated” who are enacting repressive anti-terror laws or sentencing young Muslims or African youth to jail. And it’s not the “uneducated” who run the newspapers or TV stations that nightly peddle racist trash.

Indeed, some of Australia’s most high-profile bigots had excellent educations.

It’s the structural elements that link racism and capitalism, and over which most people have absolutely no control.

The treatment of Muslims by the powers that be demonstrates this. In 1998, only 3 per cent of Australians considered Muslims a problem. Today, after more than a decade of persecution and vilification, 32 per cent admit to holding negative views toward Muslims.

But that doesn’t necessarily mean people will swallow anything that is spoon-fed to them. In recent years there has been mounting opposition to Australia Day, with tens of thousands marching in Invasion Day rallies.

Educating white people to be nicer to brown people won’t address the very real material underpinnings of inequality – it doesn’t build more houses, or give poor people jobs. Organising workers to overcome racial divisions and stand together against their bosses and government is what helps sideline racist ideas. It’s no accident that high points of anti-racist struggle have coincided with upturns in class struggle – the daily brutality of capitalism frequently lays bare our real adversaries.

This is how we overcome racism and the system that perpetuates it, a system in which money and power matter more than human lives.