It was the mountains, especially. Mountains forced Greeks to settle in isolated communities.
The fertile patches of land were surrounded by mountains and water. These patches were taken by different Greek tribes, who then built fortresses and cities. In doing so they established independent city-states each of which jealously defended its territory.
Greeks spread all around the Mediterranean and Black Seas, eventually establishing about 2,000 independent city-states.
Good luck :)