Most of what we have of Greek and Roman literature is that which was considered the best by the Greeks and Romans--for example, we have the seven plays of Sophocles which were considered his best plays. Not that everything good survived--the books of Livy which survived were not necessarily better than the books of Livy which did not survive.
The loss of the library of Alexandria is greatly to be lamented. But in the last 150 years bits and pieces of lost Greek literature have been recovered on papyrus and even though those papyri were not found in Alexandria, the copies found elsewhere in Egypt may have been copied from an exemplar at the library of Alexandria.