The seceding States cited slavery as the principle reason for wanting to leave the Union.
The “revised” version of history, written by the victor, is that the war was about slavery.
Secession was about many things, including slavery, however, the war itself was about control. The union fought the confederacy for the same reason that Britain fought the 13 colonies... to prevent them from exercising their freedom to disassociate themselves with a government that they thought no longer represented them appropriately.