The Hellenization of the classical world is one of the biggest events in ancient history, similar to the conquests of Rome in later centuries. Greek rulers held Egypt, Mesopotamia, Turkey, even places as far as Afghanistan and Delhi. This trend continued into antiquity, with koine Greek becoming the lingua franca of the eastern half of the Roman Empire and still being used as a language of administration until the 1500s. My question is, why did Greek not develop into different languages over such a long period of time? Latin diverged into dozens of distinct languages in half the time, yet Greek remained mostly pure from Anatolia to Bactria. Why?
Ancient Greek did develop into other languages. It's just that they did not end up as widespread as many of the descendants of Latin did. As happens to many (if not most?) languages, its descendants died out before becoming established. Even today, though, there are descendants of Ancient Greek which diverge from the Demotic/Katharevousa standard: e.g. Pontic, Cappadocian, Griko, Rumeíka.
The most divergent from standard Greek is probably Tsakonian, which although sometimes called a Greek 'dialect', is not mutually intelligible with standard Greek and probably deserves to be considered a distinct language. It is believed to be descended from Doric. It has only a few hundred speakers at most and is probably moribund.
As for why this happened, that's hard to say. Language evolution takes its twists and turns due to accidents of history.