The war was fought because America was built upon slavery. During the Industrial Age, the northern economy no longer needed slavery. The south however was wasn’t ready nor was trying as hard to give up its dependency on slavery. The south economy would plummet and life for southerners would drastically make a down spiral if they couldn’t have access to expensive but efficient workers you never had to pay for.
Sociologists would call this shift in focus an example of goal displacement. This happens when the original goals of an organization is being replaced with goals that are developed as time passes by. The new goals are much more related to the situation of the present times as compared to the original ones which were planned before everything started.
Both leaders "encouraged modernization" since bot nations wanted to in many ways "catch up" with the western world.