Wikipedia says it had gone extinct by 1700BC, but was still used as a classical language up until 100AD. Was it really the case? If so, what, so to speak, kept it going for so long? And why was its usage eventually discontinued?
Oh, the tablet scribe bat signal!
The last dated cuneiform text was written in the year 75 CE. Tablets with bilingual hymns in Akkadian and the Emesal dialect of Sumerian have been found with colophons saying they were copied in what we would call the first century BCE. We do not really have pagan texts from Babylonia in the last few centuries BCE or the first few centuries CE unless they were written or painted on clay or stone, so we don't know how much longer people were speaking Sumerian or writing it on skins, papyrus, or waxed tablets, but we know that there were people still reading and singing Sumerian in the first century BCE.
Why did Sumerian survive so long? For some of the same reasons that Latin, Sanskrit, or Classical Chinese survived: it was a sacred language and a language of scholarship, so being able to read and write it gave people power. If you think the Lord will only listen to your prayers if they are accompanied by a hymn in proper Sumerian, you make sure there is someone who can sing those hymns correctly! Being a learned scribe let people enter some professions (like astronomer or exorcist or doctor) and perform some well-paid offices for temples (like singing those hymns). Old scholarly families kept the tradition going even when Babylonia was ruled by Persians, Macedonians, Romans, and Parthians who were not very interested in the scribal art.
But there is another special reason: the cuneiform script is tied up with the Sumerian language. Signs represent both sounds and words, and to write concisely or read technical writing you need to know a little about those Sumerian words. So as long as people were reading cuneiform (up to at least 75 CE) they needed some basic knowledge of Sumerian, and this training was built into school curriculums which nobody wanted to change. And as cuneiform became less the script for everyday practical record-keeping, and more the script for sacred texts and expert knowledge passed on from long ago, knowing those logograms which let you read an astronomical diary or an omen list was even more important. In this respect, the tablet scribes were a lot like British and American lawyers in the 20th century throwing around a few Latin tags even if they could no longer write a grocery list or a love letter in Latin.
If you want to know more: