Most written epic poems have their roots in an oral tradition. Sometime between mankind not having much of a written language and the invention of HDTV, epic poems came into being. These poets did in writing what their ancestors did verbally -- entertain the masses. There is virtually no difference between a story told using an oral tradition and an epic poem, except for the medium in which they are preserved.
Remembering Without Writing
Two of the earliest examples of an oral tradition that morphed into an epic poem are Homer's "Iliad" and "Odyssey." This series of stories was created and performed before writing material was available to the general population at a reasonable cost and literacy was not widespread. The easiest way for these bards to remember the adventures was to break them into smaller, self-contained and manageable pieces. The performer had less to remember all at once, and it gave him an opportunity to rest during the telling of the tale without leaving the audience in an uproar. Each segment had a mini-conclusion.
Keep the Beat
Another aid to memorization was to keep a consistent rhythm. This explains why many people can't remember their grocery list but can sing all three verses to "Hotel California." Pairing the rhythm with a rhyming scheme creates an even stronger memory aid. Eastern Carolina University points out that these similarities appear in multiple languages and cultures. When an oral tradition became so popular that these memory aides were necessary, it had begun the process of becoming an epic poem -- which is generally passed from one generation to the next in a written form, instead of orally.
The Pen Takes Over
Once ink, paper and literacy caught up to the lower and middle classes, people began writing down the oral stories as they listened to them. This explains the several versions of ancient stories that are similar, but not quite the same. At some point, it became cost-effective for manuscripts to be made based on the oral traditions. This allowed more than just the memory-talented bards to tell riveting stories. Anybody could read the story -- for a fee -- to a crowd. Or, with literacy on the rise, those with the skill could read the stories for themselves.
The Epic is Born
Since most of the oral tradition stories already consisted of an effective rhythm and a rhyme scheme, the process of converting them into epic poetry was fairly simple. The memorized stories naturally lent themselves to the written poetic form, with minor changes to fix where the patterns broke down. The University of Idaho estimates that approximately 300 years passed between the use of oral tradition of the "Iliad" and the "Odyssey" and when people began writing down Homer's stories.