For nearly a century, the people and politicians of the northern and southern states had been clashing over the issues that finally led to war: economic interests, cultural values, the power of the federal government to control the states, and most importantly slavery in American society. The only compromise that could have headed off war by then was for the southern states to forgo secession and agree to abolition. The morality of the compromise was and remains legitimately open to question. But without it, there would likely have been no union to defend in the civil war.
Hope this helps