Morals and themes are essential to a story. They are what make the story have meaning. Successful authors will try to teach their readers something, most often life lessons. Think of some classical works for a moment. There are many that are famous for their morals. Some obvious examples are Aesop’s fables or the use of symbolism in William Golding’s Lord of the Flies. There are many other great works that have great morals, even if these works are not famous for having them. Authors like Tolkien and Lewis use many allegories that teach us valuable life lessons, and they are not the only ones who write to teach.
Stories that stand the test of time will always have some sort of moral or else they would be pointless. Our very literature in our world is used to teach lessons that will help us function as a society.