To face a more powerful common enemy
The war against Persia. It united all of Greece, including Athens and Sparta.
Self defence.
They were very separated by the mountainous land, but in the Battle of Salamis Sparta and Athens united to take down the Persians.
daa Sparta brought the soldiers ndd the Athens brought theirr navy (:
Sparta and Athens united during the Persian Wars primarily out of a shared threat posed by the Persian Empire, which sought to expand its control over the Greek city-states. Despite their significant differences in governance and military strategy—Sparta being a militaristic oligarchy and Athens a democratic city-state—their common interest in preserving Greek independence compelled them to form alliances, such as the Hellenic League. This collaboration was crucial in key battles like those at Marathon and Salamis, where their combined forces successfully repelled the Persian invasion.
They united 180 Greek city-states into several alliances, the first led by Sparta, the next led by Athens.
Athens and Sparta were independent City-States and therefore were not especially close. However, the Greeks did unite to repel foreign invasions. One of the reasons that Sparta and Athens went to war (The peloponnesian war), was because after the city of Athens was destroyed by Persian invaders, the Athenians stole large sums of money from the Delian League to rebuild their city (and also some of their most famous modern wonders, such as the Parthenon), which was a national treasury set up by the primary City-States of Greece. This action enraged the Spartans in particular, and caused the war.
Sparta and Athens allied during the Peloponnesian War primarily in response to the threat posed by the Persian Empire. The common enemy prompted the formation of the Hellenic League, where the two city-states put aside their rivalry to unite against Persian invasions. Despite their differences in governance and culture, the need for mutual defense fostered a temporary alliance. This collaboration was a strategic necessity to preserve their independence and territorial integrity.
Sparta and Athens were natural allies who provided support to each other - Sparta leading the Dorian bloc of independent city-states, Athens the Ionian bloc, with both interested in maintaining peace. So when a Persian expedition was sent to subdue Athens in 490 BCE after its interference in the Ionian Revolt against Persia, Athens naturally asked Sparta for support (however Athens had defeated the Persians at Marathon by the time the Spartans arrived). When Persia sent a full scale invasion in 480 BCE, the southern Greek city-states united to repel it under the leadership of Sparta with Athens providing the largest naval component. They remained friends and allies until 460 BCE, when Athens sent an army to help the Spartans put down a revolt of its serf population. During this campaign they fell out and avoided each other. After the Persians agreed to peace the Athenians turned the Delian League into an empire of its own, became over-adventurous and clashed openly with the Peloponnesian League led by Sparta, resulting in the 27-year Peloponnesian War which Athens lost.
The Persians who was led by Xerxes .
It was in their interests to join with the other Greek city-states in a coalition to defend their mutual interests and cities.
The kidnapping of Helen of Sparta by Paris, Prince of Troy, gave all the Greek States an excuse to unite and go to war against Sparta.