It seems in my limited understanding of the subject that the most important classical Greek texts preserved in the present day were written by Athenian authors. Athenian playwrights, Athenian generals like Xenophon and Thucydides, Athenian philosophers like Socrates and Plato. Wouldn't make much sense for the other Greek polities to not be as prolific in producing literature. Why were most of their texts lost?
You are right -- there were many other Greek cities filled with interesting people in the ancient world, and they were also writing interesting things. Our surviving evidence is severely skewed towards Athens. The reasons for that are complicated and mostly understandable (see below), but we must also remember that we only have access now to a minuscule fraction of the literary output of the ancient world. For every 100 plays that were written, we are lucky to have 2 of them. It is the same for history, for philosophy, for poetry, for everything. Imagine your local library: you get to take 10 books from it, then the rest is lost forever. Your selections will contain inherent biases (we can't let Dune disappear, can we? but posterity can probably carry on without the sequels).
We have two fantastic epics of Homer, but we are missing the rest of the Epic Cycle. We have nothing to compare them to, really. We have a few scrappy and fragmented poems of Sappho of Lesbos, but the rest is gone. We have 40 surviving drama texts, out of thousands, and we possess so few that we can't even reconstruct a single full docket of an Athenian drama competition. We generally only know the winners. Theodectes of Lycia wrote dozens of plays, but we have none of them, even though they were admired in their time as among the best. We have a great selection of the Athenian Aristophanes' comic plays, but zero examples from Epicharmus, from Greek Sicily. What we know about Sparta comes mostly, unfortunately, from Athenian sources, and boy wouldn't it be nice if we had some native Spartan texts to survive from Tyrtaeus or Sosibius of Sparta.
But we must also acknowledge that Athens was, in some ways, special, even if for many it is a begrudging acknowledgement. Our extant body of work is not the result of random chance, at least not entirely. The works we have were consciously preserved down through the centuries, for the most part, and that is due to a love for the Athenian story both in antiquity and afterwards. There is also an undeniable flowering of intellectual activity in Athens in the 5th century, the "Classical" period, in particular. I unapologetically call the 5th century BCE "The Athenian Century" when teaching. Yes, there were playwrights elsewhere in this time period, but Athens was the unquestionable center of drama. When Athenian soldiers were kept prisoner in the quarry dungeons of Syracuse after the disastrous Sicilian Expedition in 415, those who could recite lines of Euripides got special treatment from their captors. This is cultural capital export, an American phenomenon familiar to any student of the concept in the modern world. Socrates was at Athens, and his pupil Plato, and his pupil Aristotle. Thucydides you mentioned, but Herodotos was also writing largely about Athens, even though he was from Halicarnassos and wrote in Ionic Greek dialect. The city was enjoying a time of intensive artistic production, a heyday, during which time the literary output was quite high. We can't say for sure how much higher that output was than any other given Greek polis, but we get a strong sense that Athens had a moment (before it all came crashing down).
Richard Armstrong has a nice concise discussion of textual transmission, survival, and our Athenian lean in his introductory entry in Blackwell's Companion to Greek Literature (2016). It's a great and readable survey of what we have, what we don't have, why, and with what impact(s).