I would broaden the discussion a bit in discussing the function of literature. I believe it was Tolstoy who posed the issue of science's purpose as being meaningless because it could not answer the fundamental questions: "Who are we and what shall we do." Literature can be seen as something that must answer these fundamental questions of who human beings are and what must be done. In the examples of literature, great literature, there is an attempt to answer such questions. One of the primary purposes of literature is to examine how these questions have been answered or addressed by authors and their protagonists. In some instances, there have been direct answers given. In other instances, there have been examples given how not to progress in both questions, and our role, as readers, has been to understand that what was done in the literature is what should not be done.
TRANSMISSION OF CULTURE: While a history textbook or transcripts of court trials, or newspapers can tell us the facts and events of a society, nothing can share the feelings or beliefs like literature does. In literature we see the struggles and triumphs of various societies in addition to how people responded to them. People's morals and values are often portrayed through literature.
ART OF COMMUNICATION: Some people express themselves well visually, others verbally, and yet others with the written word that has had opportunities for editing and several drafts.
SCIENCE OF COMMUNICATION: Often, an author will have a significant feeling on an issue that they wish to communicate. To persuade people to think or feel similarly, they might entertain, use reverse psychology (like a dystopia), or blatantly describe the issue with many literary devices.
A word on literary devices: For everyone, there are different comparisons or hyperboles that speak to us. An author of a literary piece can use many to convey their point.