Literature has several purposes.
First, literature introduces readers to a variety of characters as a way for readers to learn more about themselves, others, and to let readers understand that others have gone through similar situations as they. An example is Ralph in the Lord of the Flies. He is a gentle boy and like more boys is adventurous but not violent. Then in the situation that he is placed in, he finds himself taking part in the murder of Simon. Golding's interruption: everyone contains evil. Not a trait most would like to admit they possess.
Second, literature allows readers to develop their imagination and find comfort, excitement, and adventure, and to experience differrent realities than exist on earth. These realities usually carry a message for today's world like Ray Bradbury's Sound of Thunder.
Third, literature opens up the world for all readers. Experiencing and understanding different cultures and peoples allows readers to connect with humanity where they might not have the opportunity to do so otherwise. In this day of instance connections, this experience and understanding give readers more empathy with people different from them. Chinua Achebe's Things Fall Apart is one literary work that allows the reader to experience another country's justice.
Fourth, literature enables readers to trace ideas and philosophies from ancient times forward to today to allow readers to assess the changes that have taken place and to intellectually speculate on the purpose of those changes. In Aeschylus' The Oresteia readers see the seeds of the development of modern democracy.
Fifth, literature allows readers the opportunity to improve their reading, vocabulary, and writing skills.