Agriculture was the main factor
The Mediterranean Sea separated the Greek islands. These islands grew into separate city-states as they were separated by the sea.
The hills and mountains in Greece separated the individual city-states. These cities were separated by these hills and mountains, which led to them developing into different city-states.
To establish fair access to employment opportunities to create a workforce that is an accurate reflection of the demographics of the qualified available workforce in the relevant job market