Note that this is not my idea and many, many wars of words have been fought over it so you don't have to believe it.
"Persons attempting to find a motive in this narrative will be prosecuted; persons attempting to find a moral in it will be banished; persons attempting to find a plot in it will be shot."
I've heard it attributed to Hemingway.
The idea that all stories must have a moral in order to be legitimate is modern. Conventional wisdom gets in a self-righteous huff over how the different Inquisitions censored books. It would surprise modern people to see what books those old-time moral guardians did not censor.
Daphnis and Chloë, by Longus, has a frank scene where a married woman teaches a teenaged boy how to have sex. It was first translated into a modern vernacular by a Catholic bishop and was considered a perfectly good book for teenaged girls.
The Metamorphoses of Apuleius—better known as The Golden Ass—is the oldest extant novel. It contains explicit scenes of adultery and pagan worship. St. Augustine of Hippo, the greatest of the Western Fathers of the Church, cited that novel as a partial inspiration for his own work, The City of God. None of his contemporaries faulted him for this.
I'm going by memory, so I don't have citations for some of the above claims. I have a few ideas about the origin of the modern mentality of "every story must have a moral." Those ideas center around the rise of Calvinism on the Protestant side and the rise of Jansenism on the Catholic side of Europe.
The Tale of Genji is now generally considered to hold that title.
To her credit, she thought about it and publicly acknowledged my correction in a subsequent class.
Also to her credit (and/or the school's): They offered a class on science fiction!
He managed to overcome this by gifting the teacher a dog eared copy of Dune stating "it's an allegory".
The book went unread for some time, but a year later the professor looked him up to let him know that he had read Dune, found it intriguing in how many subjects it touched, from social issues to ecology to economics and called it profound. He asked for some more recommendations upon which he rapidly became a fan of Clark, Heinlein (who he had read before, but now again with new eyes) and a few others.
I was with my classmate one day years later at a grocery store and this professor saw him and walked up to say hi. A short conversation later and the professor mentioned how he had turned into quite a fan of the genre and regrets he had spent so long ignoring it. Some of the works, he said were "silly" but a few were some of the most profound descriptions of the human condition and where we're going as a species, coupled with some of the only explorations of the changes to the ethical landscape as technology transforms the world in literature...etc. etc. Before he left he said he had recently started reading some of the old Cyberpunk works and found himself sitting up at night with the realization that many of the things described in the books were coming true now, decades later.
It was really interesting to see a man, who must have been in his 70s by this point, catch the sci-fi religion like that.
Also authors have a subconscious.