This seems to be a very common explanation for the existence of myths, even used by a professor in one of my university courses. It also seems like a way to discredit myths and/or ancient societies. Is this something that actually happened, or did the people see them as nice stories, but not actual explanations?
Oral traditions internationally often exhibit several genres of narrative. This includes what we call folktales (stories told as fiction for entertainment) and legends (stories told usually to be believed). There are many forms of legends which include contemporary - "you wouldn't believe what happened to a guy in the next village over" - and what is known as etiological legends - stories about an much earlier time intended to offer an explanation of some aspect of the world or human culture. There are also historical legends - stories about a more immediate past about culture heroes, etc.
What has come down to us in the form of written ancient mythologies are imperfect records of what was apparently floating around as oral narrative. From the recorded information that exists, we can see that there are stories that are largely entertainment together with etiological and historical legends. The record hints at what was certainly a rich, diverse oral tradition in ancient societies.
The problem, to a certain extent, is that we use "myth" (as in, "You believe that? That's just a myth!") to mean something that would be absurd to believe. I once heard someone imperfectly define mythology as "other people's religion." Because of this, by discussing ancient mythology, it can seem as though we are discrediting the ancients and their belief systems. That should never be the intent!
The following is an excerpt on definitions from my Introduction to Folklore, which may help:
European folklorists, following the lead of the folk themselves, have long recognized two forms of oral tradition, Sagen and Märchen, legends and folktales. While there are many other forms of oral tradition, legends and folktales stand in opposition to one another, yet share a great deal. In reality, lines can blur.
Legends – or Sagen as the profession often prefers – are generally short, single-episodic stories told chiefly in the daytime. More importantly, the teller intended the listener to believe the story. Legends often have horrible ending to underscore the story’s important message. Many of them are, after all, meant to be instructive, to serve as warnings in some way. These types of stories are not necessarily long-lived. Their point is to reinforce and prove the legitimacy of a belief. Nonetheless, some legends take on a traditional character, can become multi-episodic, and migrate over considerable spans of time and space.
Folktales – or Märchen, again using the German, technical term – are longer stories with more than one episode. They are restricted, in theory at least, to evening presentation. A folktale is not to be believed, taking place in a fantastic setting. The European folktale also requires a happy ending, the cliché of “happily ever after.” Any given folktale can be told with considerable variation, but they are traditional in basic form, and folklorists have spent decades tracing the history and distribution of these stories.
and then:
Besides the legend and the folktale, there is also the folk ballad, a specialized form of oral tradition that, like the others, incorporated a wide range of beliefs. The ballad had roots in medieval Europe, combining narrative and song. The ballad usually focused on a single incident, and it almost always emphasizes action.
Something also needs to be said here about myth. People use this term awkwardly. In a European context, myths tend to be the artificial constructs of ancient and Classical-era priests or literate people who sought to weave folk traditions into a comprehensive whole. The exercise often had political purposes, designed to provide diverse people with a single set of beliefs and stories. By reconciling similar traditions, the shared culture of these groups could be seen as more important than the differences, justifying the central rule of the king and his priests. Myth is also a way of organizing and reconciling folk traditions, which by their nature can be contradictory and highly localized. Myth tends, however, to make gods of supernatural beings, giving those powerful entities a status – for modern readers – similar to the Judeo-Christian-Islamic God, even when this comparison is not justified. Of course, it is also important to point out that myths were stories that were told – and then written down – and they were different from religion itself. Many myths were simply the shared cultural inheritance of a group of people.
In general, the word myth is best set aside when discussing more recent folk traditions, recognizing its proper status as a literary genre. Nonetheless, ancient documents recording myths can assist in understanding the history of various stories and beliefs. The authors of these texts were, after all, the first folklorists, and they were the only ones coming close to practicing the craft at the time. Some folklorists carelessly use the term myth to denote those legends that deal with a fantastic, remote time. This primal era saw the creation of many familiar things such as day and night, fire, animals, people, mountains, and all other aspects of the present world. Folklorists properly refer to these stories as etiological legends explaining the origin of things. Sometimes, however, people interchange etiological legends with the word myth. The problem with this is that “myth” can imply something that is inherently wrong, linked to “primitive” superstitious beliefs. When the term “myth” is used for the folklore of existing cultures or for the traditions that were viable only a generation or more ago, it can take on an insulting, derogatory tone. It is best to reserve the word “myth” for ancient and Classical-era texts.