I've been reading Herodotus recently and it got me wondering how so many ancient texts survived through the centuries.
Of course the Eastern Roman Empire didn't collapse until 1453 but did this play a role in protecting a lot of documents that would otherwise have been lost?
If not then how did these texts survive?
I'd be interested in hearing if there were any libraries or academics in the Eastern Roman Empire that helped to preserve these texts into the Medieval period.
Yes and no: yes, the eastern empire carried on copying Greek texts, no they didn't preserve Latin texts. Latin texts were copied in traditionally Latin-speaking regions in the west.
There was a fallow period in the early Byzantine era, around the 5th-8th centuries, when book culture greatly subsided. But even at that time, the development of the catena (line-by-line biblical commentary) led to similar practices with some classic authors like Homer and the tragedians, producing bodies of what are now called scholia on those authors, compiled out of excerpting ancient treatises. These authors were still being taught in schools.
From the 800s onwards, though, book culture was proactively revived, and both lay and ecclesiastical people and institutions were actively involved in book transmission from then until the 1400s. Some key figures in the first phase of that period are Leon the mathematician, patriarch Photios, archbishop Arethas, and emperor Konstantinos VII Porphyrogennetos.
Here's an answer I wrote earlier this year that covers some of the same ground at greater length, and here's an offsite piece that goes into greater length still. Follow-up questions are of course very welcome.