How is myth used in sacred texts, and how is this different from other understandings of myth?
The original Greek term "mythos" simply means a story. Although any tale could be termed a myth in Greek, it eventually became used as a way of distinguishing traditional or legendary tales from ones told about contemporary events or invented by individual contemporary authors. In the "religions of the book" (Judaism, Christianity, Islam, Mormonism, etc.) the centre of the religion is a written "Scripture", narrative accounts of divine beings, and ritual in many ways replicates or adds to a textual core. In ancient religions, rituals were earlier, and myths accumulated around a ritual core. What was sacred was not the texts or myths, but the ritual acts they explained or accompanied.
In modern popular parlance, we use the term "myth" for a sacred text which we do not believe. Thus can be a confusing usage because what is termed "myth" will vary depending on the religion of the speaker -- a Christian might term the Upanishads "myths" but a Hindu might say the same of the Bible or the Book of Mormon. Thus in academic environments, we usually restrict the term myth to stories belonging to oral traditional cultures.
According to the believers (Jewish, Christians and Muslims) myths or stories in the sacred texts are the narration of the actual events that had taken place in the past. These are not like myths of the legendary people/gods as associated with the Greek.
Though some modern followers of the Christianity and other religions may not believe the stories of the sacred texts or Scriptures to be true but irrefutable evidence have been found for the Exodus as given in Quran, the Book followed by Muslims, and many archaeological sites confirm the other stories of the sacred texts too.
The myths of the sacred text have generally one single theme - those who did not follow the commands of God met the wrath and perished from the earth whereas those who believed and showed perseverance survived and were successful. These stories have been told in the scriptures to inspire people to be obedient to the God so that they may succeed in the end, the hereafter. If they disbelieve and do not become God's obedient servants then they may meet a similar punishment in this world and in the hereafter their reward will be hell fire. This in the words of God is as:
Evil has appeared on land and sea for what the hands of mankind has earned
That He may cause them to taste some of what they have done in order that they may return.
Say: "Journey in the land and see as to what was the end of those who went before: Most of them were pagans."
Therefore stand up thou with thy whole being for the Right Faith before the coming of the day from the God which no one can avert,
On that day they shall all be separated.
The myths in the Scripture are to serve the purpose of a reminder to the mankind.