Library is said to be memory of the human race because it is the only place where literature about the beginning of the universe till the predictions about the end of it is placed.
The eras that have come to an end are still memorized by the books in the library. The cultures, traditions, rituals, histories, wars, that have come to an end thousands of years ago are still alive through books. People, things, situations, eras are still living due to the books. And because all books are found in the libraries, so they are called as the memory of the human race