Ultimately, the emergence of classical Greece seems to have been, at least on some level, shaped by the aftermath of the Bronze Age collapse and the end of the preceding Mycenaean civilization. This collapse resulted in the Greek Doric Age, or Dark Age. This was a period of extraordinary decline. As Ian Morris and Barry B. Powell write:
Everywhere in the twelfth and eleventh centuries BC were movements of population, the fall of states, and economic chaos … but the Greek states fell hardest and took longest to recover. By 1000 BC, the population of Greece was one-third what it was in 1300 BC … Agriculture declined and monumental stone architecture disappeared, as did writing. There were migrations into and out of Greece. Long-distance trade faded away, a thing of the past.
The Doric Age, then, represented a dramatic break with the Mycenaean past, and one where the entire history of civilization essentially had to be rebuilt. It is in this history of rebuilding that many of the features and characteristics of classical culture evolved and took shape.
At the same time, factors such as geography need to be accounted for as well. Greek geography made large scale unification very difficult. It is highly rugged and mountainous, and its soil is relatively poor compared to other early centers of civilization. These geographic barriers resulted in the emergence of the various Greek city states, independent of one another and with very strict limitations as to the maximum population sizes they could support.
The culture that emerged out of the Dark Age was predominantly aristocratic, and dominated by oligarchies. However, in many of these aristocratic states, the oligarchies eventually broke down and became tyrannies, by which the city state became dominated by a single autocratic ruler. The tyrannies were eventually overthrown, but they were influential in shaping the evolution of democracy. Athens itself was taken over by tyranny, and its democratic system of government aimed at preventing such power structures from again dominating the state. This is why you can observe customs like ostracism, or the selection of offices by random lot: the aim is to prevent power and influence from becoming concentrated around a single person.
Finally, you should be aware that ancient Greece itself was part of a much larger nexus of civilization centered around the Mediterranean. Particularly important, where the history of Greece is concerned, is the Persian Empire. Greek history and Persian history do seem intertwined: Consider both the Persian conquest of the Greek city states in Asia Minor, as well as the attempted conquest of Greece itself. You might also consider Persian intervention in the Peloponnesian War, or Persia's employment of Greek mercenaries in its own internal power struggles. Additionally, to the north of Greece, there was Macedon, which, under Philip, would conquer the Greek city states, setting the stage for the conquests of Alexander the Great, and the rise of the Hellenistic World.