As far as I know, most Confederate statues in the US were installed in the 1900s, half a century after the Confederacy's defeat in the American Civil War. The R.E. Lee monument in Monument Avenue seems to be actually one of the oldest in Virginia, having been commissioned in 1890, with the accompanying Jefferson Davis and J.E.B. Stuart monuments only being built in the early 1900s.
EDIT: If anything, they're a monument to the resurgence of racism and white supremacy in the early 1900s. Whether that warrants public monuments is a question for the American people, of course.
It wasn't really a "resurgence," since racism and white supremacy had existed in America all along, almost from the very beginning.
The monuments are more of a testament to the historical methods and perceptions which appeared to have more of a political objective than anything else. Keep in mind that a lot of the patriotic imagery and symbolism associated with Americana came about after the Civil War, and this also had an effect on how Americans (both in North and South) viewed the Civil War. A lot of what we consider today to be part of the "mythos" of America came about during this time.
I don't think the monuments were put up to commemorate racism as much as they were put there to create the perception that America was now
against racism and white supremacy. After all, the story goes that Robert E. Lee was personally against slavery and that he only joined the Confederates out of loyalty to his state. Even if that wasn't really the truth, the bottom line is that all parties involved have conceded and acknowledged the basic principle that slavery is wrong and its abolition was a good thing for America.
Even the pro-Confederate Lost Cause couldn't really advocate for a return to slavery, since the central hero of their epic tale was said to be against slavery. Their entire narrative depended on portraying Lee as a noble, gentlemanly, heroic figure who held his army together under grisly conditions against insurmountable odds. Even the Union version of history gave a lot of respect to Lee and other Confederate leaders, and Union leaders such as President Grant also pressed for reunification and reconciliation.
Likewise, Americans fully believed in the concept of equality, as they understood it at the time, but the prevailing notion was "separate but equal." That, too, was a lie, but it was a lie so that Americans could feel good about themselves as a righteous, noble country which valued freedom, justice, and equality.
In the West, there were similar lies that came about and established the order in the states which were formed after the Civil War.