About ~500 years ago, white Europeans started colonizing America, while simultaneously purchasing and kidnapping black people from Africa and making them slaves. Europeans established communities in the Americas, mass-murdering the native populations. They then brought black people to America to those new European-settled communities (known as Colonies) and traded them as slaves for commodities that white Europeans wanted, like sugar, wools, coffee, metals, etc. This was called "The Slave Trade" or more appropriately, "The Triangle Slave Trade" (where black slaves made up one point, American colonies & commodities made another point, and those refined American commodities were then traded for slaves again at the third point, with profit being made on the margins at each turn. This was the corner stone of British, Dutch, Spanish, Italian, and a handful of other European countries/nations' revenue for approximately 200 years). While black slavery on the European continent existed, for the most part, Europeans preferred to trade black slaves to European colonies in the Americas (and elsewhere, but chiefly, Americas) instead of bringing them to Europe -- it generated greater revenue and at a fraction of the cost, as communities of black slaves would not need to be supported throughout White Europe.
By the late 1700s, progressive abolitionists in Europe had determined that slavery was morally wrong and had started to move against it as Northern Europe had begun industrializing and the triangle trade became less lucrative. Simultaneously, European Colonialists began to demand independent rule throughout the Americas, and in the 1770s, colonies in North America (regions now known as the United States) revolted against British rule, and about 15 years later, slave colonies in the West Indies (now known as Haiti) revolted against the French. A slew of further revolutions bubbled throughout the American continents, though neither as successful as the initial American and Haitian slave revolt.
Despite winning independence from Britain, the American states remained close trading partners with Great Britain, and Great Britain, the Dutch, and other European colonialists continued to maintain a thriving slave trade with the Americas, with the lynchpins being black slaves kidnapped or bought from slavers in Africa and sugar & cotton in the Americas. The British industrial revolution was built on the back of black slave labor in the Americas. Having not sold nearly as many slaves in European countries as they had to European colonists, many European countries came out against black slavery and supported abolition, though continued to be strong economic partners with regions in the United States -- chiefly the American south -- where black slavery was still legal (And thriving), many European economies were dependent on (now) American black slave labor (and many would only abolish slavery in their home countries, but not their colonies around the world for some decades later).
While Britain abolished slavery in 1833, across the Atlantic in that same decade it was clear that the United States was approaching a cataclysm over the issue. About half of the states supported abolition of slavery and half of the states supported the institution of slavery. New states were created and welcomed into the Union primarily to keep this balance in tact, and compromises were made in the 1850s to try to maintain the delicate balance between slave states and free states. Eventually, a major national political party would emerge from the division over slavery -- The Republican Party -- running primarily on the issue of abolition. The party elected Abraham Lincoln, and he won the 1860 presidential election with a strong majority of electoral votes, and in the ensuing days, with the support of many European allies the first of 11 states in the Southern United States seceded from the Union based on the issue of slavery. One month after Lincoln was inaugurated and sat in the White House, the Confederate States (as they were calling themselves), with the support of their European allies, would declare war on the United States by attacking Ft. Sumter in South Carolina This was the start of the American civil war.
The issue of slavery dominated the ensuing years of the war, and by 1863, President Lincoln declared by fiat that slavery would be abolished, proclaiming that all slaves -- north or south -- were now emancipated. The war carried on for two more full years, with the Confederacy finally suing for peace at Appomattox Courthouse. As conditions for peace, Lincoln granted clemency to most surviving Confederate leaders and military men as long as they swore off the Confederacy and declared allegiance to the United federal government. Lincoln was assassinated shortly there after by a confederate sympathizer, John Wilkes Booth, who believed Lincoln a tyrant. The following decades were marked by the era of "Reconstruction," where the newly reformed federal government tried to rebuild the ravaged south, reintegrated southern states back into the Union, and enforce abolitionist legislation. This effort was, in many respects, a failure, as Southern states still held a sort of de facto slavery, enacting laws that kept black Americans as 2nd class citizens, or even when laws weren't in place, enforcing a sort of second class citizenship by mob rule.
I am not going to go into the modern or contemporary era. But America's horrendous race relations, whether it's police brutality and white nationalist rallies in 2018, busing riots in 1974, the assassination of Martin Luther King in 1968, Plessy v. Fergeson in 1896, the attack on Fort Sumter in 1861, and nearly every other issue related to race in between these dates, before, and after can be tracked back to the settling of the Americas as an economic slave colony for Europe. The US fought its most deadly war on the issue of slavery and emancipation, but the racist undercurrent that led to that war -- and every conflict ever since -- has never been settled. Black Americans had been treated as non-humans for hundreds of years on the continent, and even once they were recognized as humans and citizens under law, they were treated as second-class citizens by law, and then when those laws were abolished, by fiat, and then by institution. The conflict between classes of citizens in America based on race is part of the genetic makeup of the country. It won't likely be resolved in my lifetime. That's the short historical answer to "why is race such an issue in America," it can probably be distilled to "America, on the whole, is still a racist country."