With the advent of cuneiform, the Oral Tradition continued to develop alongside ‘written literature’, but the primary purpose of recording stories in writing was not necessarily to supply individual readers with a coherent or connected account of ‘historical’ events.
Ancient stories were used for a multitude of purposes, often in extracts attached to ritual, to give authenticity, or to provide an aetiology, i.e. a reason for the way things are as they are, to lend weight to ancient traditions, or customs, or to an incantation.
Many of the ancient scribes were Incantation Priests.
Source: Stuart France