Ancient Greece lied in the territory of modern Greece: and this land is characterized by many islands, peninsulas, high mountains and deep valleys between those islands.
This means that the single settlements were easy to defend but hard to attack: this is why they did not unite, but were any isolated city-states.