They were both plolis's (city-states)and powerful.They are the most famous polis's in ancient greece . It's only my guess though.Sorry if I get it wrong.
Sparta and Athens' environments are similar, but different, both aren't very good for farming anything besides figs, grapes, olives, and barley, and both are mountanous.
-Hidden-Words