The reason why the king of Arcadia is angry when Atalanta is born is because "A. Atalanta is a girl, and the king wanted a son," which is why she's initially left on a mountaintop to die.
Well, one part of it is that if a country knows you're not going to attack them, they're more likely to trade with you and help you out during a war. Also, many countries end up in alliances because they are all working towards the same cause, like defeating a particular country. So sometimes it's like an "the enemy of my enemy is my friend" kind of thing. Some times alliances are formed for protection, particularly by a young country or a smaller country. The best example I can give of this is from during and after the American Revolution, where the soon-to-be-United States of America formed an alliance with France so they both could take a jab at England. Hope this helps!