In my mind there is not much question why the South left--the tide was turning toward new territories not allowing slaves, and that was cemented by the election of a Republican president.
I'm less clear on the Union's position. They weren't opposed especially strongly to slavery. The South did seize Federal property in the form of forts within Southern territory. But it seems like the North could have negotiated a scenario where they were duly compensated and all the prisoners released.
Was it because the U.S. foresaw a rival nation as a competitor for new territory on the continent?
There was a constitutional argument against secession. The US' first constitution is informally called the "Articles of Confederation", but its full name is the "Articles of Confederation and Perpetual Union". The latter part, "perpetual union", is important because it implied the states that joined the union would never break apart.
However, the AoC are not the constitution anymore; rather the big-C Constitution is, thus the "perpetual union" part of the AoC might not have to stick anymore. It did, though, partly because the Preamble of the Constitution called for a "more perfect union". However, you can't get more perfect than perpetual, so the Constitution must also then call for perpetual union amongst the states.
This was the argument laid out by Lincoln in his First Inaugural Address against secession. The union was perpetual and even if it were viewed merely as a contract amongst state parties (which Webster argues against in his debate with Hayne, which Lincoln probably agreed with) than it could only be abrogated with the consent of all parties, including states in the North and South. Thus, even if the Constitution were construed as something it were not, then it would require the consent of all states for one to secede.
Finally, Texas v White (1869) basically confirms that Texas had never left the Union when it rebelled, meaning that secession hadn't even ever really occurred, from a legal standpoint.
In all, secession, according to Lincoln, was unacceptable because it broke against the constitutionally guaranteed perpetual union of the states.