Their early democracy was just a form (actually, several forms) of direct (partial) democracy that many other city-states and even tribes practiced at some time in their existence. For a well-known example in the same area and age consider the roman republic which evolved on its own before close contact with the greeks. Classical Athens was a bit more "democratic" (less oligarchic) that Rome, of course , but the general idea of citizen's assemblies, voting by "tribes" within the territory of the city, even "professional politicians" (demagogues), was a common one.
Democracy was independently invested and reinvented many, many times.