Just about every library has more books than it can store in it's main building. Research libraries often retain their lower use collections in high-density storage buildings where tens of thousands of books can be stored in boxes and retrieved upon request.
Here at UVA, we have Ivy Stacks, a big warehouse off grounds that was built a few years back to house the lower use collections. Each box in this picture is one cubic foot filled with books and each shelf is two boxes deep. The shelves go waaaay up and run the length of the building. You can see L-- walking down the row to get a sense of the scale of this place.
And even though we call these books "low use", there are library staff who work out there full time, retrieving books for return to the main library or scanning articles for digital delivery.
Retrieval is accomplished with a customized lift that has a shelving attachment. The driver can go anywhere along the stacks, find the box they're looking for, retrieve the particular book, and then go on to find the next requested item. It seems a little like finding a needle in a haystack when you first look at the scale of the building, but everything is catalogged, labeled, and organized and findable!