What is the Purpose of a Library?

The purpose of a library, in the broadest of terms, is to collect and preserve knowledge. Many libraries are created to warehouse specific types of knowledge such as law or medicine.