Works—or, commonly, small fragments of works—have survived by being found by archaeologists during investigations, or accidentally by anybody, such as, for example, the Nag Hammadi library scrolls.
The discovery, in 1822, of Cicero's De re publica was one of the first major recoveries of a lost ancient text from a palimpsest.
Another famous example is the discovery of the Archimedes Palimpsest, which was used to make a prayer book almost 300 years after the original work was written.
Well known but not recovered works are described by compilations that did survive, such as the Naturalis Historia of Pliny the Elder or the De architectura of Vitruvius.
The destruction of ancient libraries, whether by intent, chance or neglect, resulted in the loss of numerous works.