The idea of the 'noble' Confederate soldier defending their homeland is not so clear either.
Take this article for example.
For some Americans, history isn’t the story of what actually happened; it’s the story they want to believe.
www.theatlantic.com
"But the historian Joseph T. Glatthaar has challenged that argument. He analyzed the makeup of the unit that would become Lee’s Army of Northern Virginia and pointed out that “the vast majority of the volunteers of 1861 had a direct connection to slavery.”
Almost half either owned enslaved people or lived with a head of household who did, and many more worked for slaveholders, rented land from them, or had business relationships with them.
Many white southerners who did not own enslaved people were deeply committed to preserving the institution. The historian James Oliver Horton wrote about how the press inundated white southerners with warnings that, without slavery, they would be forced to live, work, and inevitably procreate with their free Black neighbors.
The
Louisville Daily Courier, for example, warned nonslaveholding white southerners about the slippery slope of abolition: “Do they wish to send their children to schools in which the negro children of the vicinity are taught? Do they wish to give the negro the right to appear in the witness box to testify against them?” The paper threatened that Black men would sleep with white women and “amalgamate together the two races in violation of God’s will.”
These messages worked, Horton’s research found. One southern prisoner of war told a Union soldier standing watch, “You Yanks want us to marry our daughters to ******s”; a Confederate artilleryman from Louisiana said that his army had to fight against even the most difficult odds, because he would “never want to see the day when a negro is put on an equality with a white person.”
The proposition of equality with Black people was one that millions of southern white people were unwilling to accept. The existence of slavery meant that, no matter your socioeconomic status, there were always millions of people beneath you. As the historian Charles Dew put it, “You don’t have to be actively involved in the system to derive at least the psychological benefits of the system.”
It's safe to say that many who excuse the Confederacy like to hide behind 'states rights' or the idea that it was just their homeland being invaded. I'm sure in the minds of many at the time that was the case. A good chunk of Southern whites did not own slaves. But as Dew points out, you can benefit from something without participating in it. To minimize the effect of the hierarchal, race based caste system that existed in those places is to ignore the root causes of the war itself and the inherent contradiction of a country that boasted itself as 'land of the free' when a quarter of its population was certainly not free.
And half the country would rather have seceded than look that contradiction in the eye.