After Sumerian stopped being spoken it went on being written for roughly two thousand years, and that makes it one of the earliest documented cases of a language kept alive by religion. Akkadian-speaking scribes learned it in school, copied its literature, and compiled bilingual lists and grammars to teach it, in a curriculum that is itself the reason so much survives. Temple liturgy in particular stayed Sumerian: laments of the kind performed by the gala priests, hymns to the gods of the great cities, and incantations were composed and recited in it long after nobody outside the scribal and priestly classes could understand a word.
The pattern is familiar from later cases, Latin in the western church, Ge'ez in Ethiopia, Sanskrit in temple ritual, Old Church Slavonic in Orthodox liturgy, Coptic in Egypt, and this is the earliest instance anyone can document. What it preserved is substantial: the hymn cycle attributed to Enheduanna, the laments over the destroyed cities, and a body of myth about Inanna, Enki and Enlil that is the oldest religious literature in existence. A language with no relatives and no speakers left the deepest single deposit of religious text in the ancient world, because a priesthood would not let it go.