For documents to survive, they needed to be important enough to the copyists to keep recopying, as the technology of books was upgraded—from wax tablet to scroll to codex in capitals to codex in lower case. And they needed to be important enough to be copied multiple times, so that random destruction of books did not eliminate the last remaining copy.
The perishing of the great libraries of antiquity did away with a lot of unique copies of texts. So did the looting of Constantinople in 1204: there were a lot of heretical texts kept under lock and key at the Patriarch’s, which were lost forever.
So the data had to be actively maintained to be preserved. If it wasn’t, what we get is random bits and pieces from garbage dumps. That’s what we have of Sappho, for example. It’s why the only capital letter codices we have are luxury items, such as the illustrated Dioscurides or the Codex Argenteus. Each time the technology of books is upgraded, it’s effort to recopy the text, and effort is necessarily selective. And codices were always susceptible to becoming palimpsests, if noone found them interesting any more.
So what literature was prioritised for copying in Greek literature? The school curriculum. That means the top texts in Attic, the prestige dialect, and Homer, which was the foundation of Greek culture. It did not mean lyric poetry, which was in the wrong dialect and not fashionable. It did not mean Menander, because that was in Koine, and the monks did not get sitcoms anyway. It meant lots of Galen and Hippocrates, because they were of practical use. And it meant huge amounts of theology, because Christian monks were doing the copying.
And there was lots of accidental survival. We have double the Euripides that we have of the other dramatists, for example, because a volume of the collected works of Euripides accidentally survived.