Because a country is sovereign. It can do whatever it wants unless it steps on the toes of another sovereign actor at which point a diplomatic incident ensues. But by default a state is the highest human authority so it doesn't need permission to do anything.
Right. Sovereign states exist in a state of anarchy. They can do whatever they want, and the only ultimate way for one state to stop another is through force.
Of course, this is the traditional Westphalian model that is beginning to cede to voluntary associations of sovereign states that solve their disputes in freely associated bodies, e.g the WTO, the United Nations, the International Criminal Court.
These bodies really ultimately have no binding authority except that granted to them by the states of which they are composed, but reciprocity and social norms are starting to give us a ladder out of pure anarchy. That's really been the project of international relations of the twentieth and twenty-first centuries.