I was chatting with an American friend last night about the civil war and alternate history and such, and when I asked him why the south succeeding the Union was "illegal" (probably not the word for it).
From my understanding as a non American, the union was a voluntary organisation when it formed, so surely if a state wanted to leave, regardless of the reason, there's some legal basis to them being allowed to do so. So why couldn't the CSA succeed the Union.
Sorry if this is more of a political question, I'm just curious.
/u/gm6464 linked an excellent summary of the political calculus on both sides of the war. I will try to address your question of why secession was not permitted in a legal sense.
When the United States Constitution was drafted and ratified, there was considerable disagreement about whether the Union was created by the consent of the states and given power relinquished by the States (an interpretation known as "compact theory"), or whether the Union was created by the consent of the people and given power by the people directly ("contract theory"). There is support for both arguments, but the North decided that the Union was created by the consent of the people and could not be dissolved by the states, and the North won the war, so contract theory is the interpretation of the Constitution that survives today.
The initial US government under the Articles of Confederation of 1781 was very much a product of the consent of the states, and supported the "compact theory" interpretation of the federal government. As a compact between the states, this government offered equal representation to each state in the legislature, and allowed legislative proposals to be vetoed by a single state; thus unanimous consent was required to accomplish anything, and the federal government was too weak to address issues of national concern.
The Constitution of 1787 was specifically designed to strengthen the federal government and make it less dependent upon the consent of the states. This movement toward national sovereignty is expressed in a variety of ways, one of the most famous being the preamble. The first draft began "We the people of the States of New Hampshire, Massachussetts, Rhode-Island [etc etc]" but this was changed to "We the people of the United States" for the final document. In addition, the legislature was revised to contain a House of Representatives in which representation was apportioned by population rather than equally per state. However, even the Constitution of 1787 preserves some features which suggest a compact theory interpretation of government; chief among them is the Senate, in which representation is apportioned equally to each state and not according to population. These compact-theory-esque features were necessary in order to obtain the consent of smaller states to the constitution.
Thus, the Constitution of 1787 was a hybrid. It was an ambiguous document which preserved some features suggesting that the federal government was a compact of the states, but also took some bold steps toward federal government as a contract of the people themselves.
Almost immediately after the Constitution was ratified, the federal courts began endorsing contract theory over compact theory. In the case of McCulloch v. Maryland, Chief Justice Marshall of the United States Supreme Court summed it up like this:
To the formation of a league such as was the Confederation, the State sovereignties were certainly competent. But when, "in order to form a more perfect union," it was deemed necessary to change this alliance into an effective Government, possessing great and sovereign powers and acting directly on the people, the necessity of referring it to the people, and of deriving its powers directly from them, was felt and acknowledged by all. The Government of the Union then (whatever may be the influence of this fact on the case) is, emphatically and truly, a Government of the people. In form and in substance, it emanates from them. Its powers are granted by them, and are to be exercised directly on them, and for their benefit.
However, Justice Marshall's solemn pronouncement is obviously nonsense from a certain perspective. Article VII of the Constitution specifies that "The Ratification of the Conventions of nine States, shall be sufficient for the Establishment of this Constitution between the States so ratifying the Same." If the federal government was really created by the people, then why was it effectuated by ratification by the states? This question was never well resolved, and the disagreement over compact theory vs contract theory persisted in popular discussion and legal interpretation.
At the Civil War, the conflict between the two theories came to a head because the justification of the war depended on this issue. If compact theory was correct, then the federal government was created by the states and the states arguably had the right to withdraw from the Union they created; thus, the South went all-in on compact theory. In contrast, under contract theory, if the federal government was created by the people, then the states lacked the authority to withdraw because they didn't create the Union in the first place; thus, the North went all-in on contract theory. Abraham Lincoln famously doubled down on contract theory by referring to the United States government as being "of the people, by the people, and for the people" in his Gettysburg Address.
The North won, and contract theory has been the dominant interpretation of our Constitutional order ever since.