The answer is by outright thievery.
The Great Library of Alexandria, the most significant library in the Ancient World, was built during the reign of Ptolemy I, some three hundred years before Miriam’s time. His grandson, Ptolemy III, used two unscrupulous tricks to amass the library’s vast collection of 700,000 scrolls, many of them precious originals.
First, he ordered all ships unloading cargo in Alexandria to be searched for books. Any found were seized and copied. The copy, however, rather than the original, was returned to the owner.
Second, he borrowed from the government archives in Athens the priceless manuscripts of the Greek poets Sophocles, Aeschylus, and Euripides, pledging his word and a deposit of fifteen gold talents, an enormous sum of money, for their safe return. (One gold talent was the value of about twenty years of ordinary labor.) Once again, he kept the originals for the Library, returning only the copies and forfeiting his deposit.
The collection for the Great Library grew so vast that Ptolemy III had to construct a second “daughter” library at the Serapium, the temple to honor the Hellenistic-Egyptian god, Serapis.