They were fighting for independence from a US government who sought to force their way upon them. I suspect the average Confederate soldier gave no thought to the notion they were protecting the institution of slavery but rather fighting for their southern homeland and heritage. In actuality, there were very few slaveholders, southern whites were not rich enough and actually worked the farms and businesses of the south. many were from the mountains were there was no slavery at all.
I have many books about the war and there are a couple of books made back in the 50’s and 60’s.
In them are letters from soldiers on both sides and there is hardly a mention about slaves or slavery.
Another point.
When you look at the books made back in the 50’s and 60’s to today then there is a massive difference on the facts.