They fought and died because men from the North came there with guns to overthrow their elected governments and subjugate them.
They didn't give a sh*t about slavery one way or the other, but someone invading their land was an enemy.
And those men came down there with guns because the South launched a bloody rebellion in defense of their institution of slavery.
McPherson says, "...about one-third of all Confederate soldiers belonged to slaveholding families..."
Others estimate 1/4, depending on the Confederate Unit's place of origin.
And we can be certain slaveholders held the Confederate leadership positions.
Indeed, Southerners who opposed slavery were more likely to be Unionists.
Of the circa 1,000,000 total Confederate soldiers about 120,000 were drafted and of those large numbers were said to be Unionists:
"A cartoon from the war, showing the Confederates forcibly drafting a Unionist man into the Confederate army.
The Unionist man objects, with the Confederates threatening to lynch him if he does not comply."
Finally, a reminder: Confederates began their war by invading Union states.
In the Civil War's first 12 months, 30 of 52 larger battles were fought in six Union states & territories -- Missouri, Maryland, West Virginia, Kentucky, Oklahoma & New Mexico.
It wasn't until May 8, 1862 that the total number of battles fought in Confederate states first equaled the number fought in the Union.
All told, the Civil War's 384 battles were fought in 18 Union states & territories, and, oh yes, in 11 Confederate states.