Classical Sanskrit does not treat the retroflex lateral as a separate sound, and by the standards of the classical grammar the letter is unnecessary. Vedic recitation keeps it, and the received text of the Rigveda writes it wherever a voiced retroflex stop stands between vowels, so the oldest layer of the literature uses a sign that the later layer does not. The substitution is described in the classical grammars, and it is one of the clearest cases in the alphabet of a letter preserved by a tradition of recitation rather than by the grammar of the written language.
The sound is otherwise a living one across a wide area. Several Middle Indo-Aryan dialects use it, it is current in Marathi, Gujarati and Oriya among the modern Indo-Aryan languages, and it is standard equipment across the Dravidian family, so a script serving any of those needs the letter whatever Sanskrit requires.
Its position at the end of the consonants, after the aspirate that closes the inherited order, marks it as an addition rather than an inheritance. That placement is the ordinary convention for anything added to a recited sequence, and the same position later received the three consonants that Tamil-Brahmi supplied for Dravidian sounds and, in some traditions, the cluster recited as a letter after them.