Yes, that's a general principle called pacta sunt servanda. Just as the rest of international law, its effectivity is limited and based mostly on reciprocity and the threat of retaliation. The reality is that international law is violated every day and there is no international police coming to knock on a country's door every time they do it. Most treaties also come with an implicit or explicit procedure to withdraw from (or “denounce”) it. Unless and until you do that, other countries will however regard your commitments as binding.
Importantly, countries enter agreements precisely to gain more certainty regarding future relationships, apart from the vicissitudes of internal politics. They bind a country as such and not merely a president or administration. Obviously, there is an inherent tension between that and democratic processes but America's partners have no reason to accept that everything is open to renegotiation every time a new president is elected.
On a more general level, you do not want to treat all international agreements as negligible because it damages your credibility and your ability to enter new ones. Even if you are unhappy about some aspects of a treaty or agreement, you might go along with it as a way to preserve your ability to use international law to pressure other countries.
The US can count on its power to give it some leeway and need not fear sanctions or retaliation in that particular case but even a country with overwhelming military might relies on treaties. Ultimately, a government has to somehow decide whether a particular violation and the fallback it can expect is worth whatever tangible or symbolic benefits it would gain from it.
To shield from that, many international organisations (the EU, the GATT/WTO) were created through a web of interlocking agreements, ratcheting up commitments and making it more costly to step out of the whole system. Individual “soft” agreements like the Paris agreement are easier to ignore (in fact, many countries are far from meeting their obligations, no need to make a fuss and formally leave for that).