The vast majority fought because their state governments told them to.
Why did those governments want them to fight?
Slavery.
Incorrect, the majority of soldiers in the Confederacy were volunteers.
They seceded because they deeply resented the North basically becoming tyrants over them and forcing them to do things that were not in the interest of the people of the South. Slavery was just one of those things. The average soldier did NOT own slaves nor did his family and did not have a dog in that fight (so to speak).
They FOUGHT because the North refused to honor the wishes of the southern states to peaceably withdraw from the Union and invaded the Confederacy. Yes, I know about Fort Sumter. The Confederacy fired on that fort because the Union was baasically told to leave Confederate land and refused (on the orders of Lincoln) in hopes of starting a war and giving the North the excuse to invade.
Please don't try to tell me that it is unconstitutional to secede when our very own Declaration of Independence says otherwise.
When a complete, total, instant military victory will not yield the result for which the war is claimed to be fought, that claimed reason cannot be valid.