Why do we have libraries? What good are these documents and history books? Why do we record and save the actions of men, the negotiations1 of government officials and the events during wars?

Why do we have libraries? What good are these documents and history books? Why do we record and save the actions of men, the negotiations1 of government officials and the events during wars?