As I understand it, auslauts are written whenever a suffix starting with a vowel is attached to a form ending in a consonant. In other words, you would indeed write lugal-le and lugal-la. This isn't a hard-and-fast rule, and there's some variation by time, place, and individual preference (e.g. both tuš-a and tuš-ša₄ are attested), but I don't think it's ever wrong to include the auslaut, and it appears more often than not.
The reason for this, according to Foxvog, is a phonological process that deleted most consonants in final position (or maybe coda position). In other words, aŋrig "steward" represented something like /aŋrig/
[aŋ.ri]
, while aŋrig-ga "of a steward" represented /aŋrig-ak/
[aŋ.ri.ga]
. Since the basic unit of cuneiform was the syllable, rather than the phoneme, it made sense to write the final syllable as ga rather than a, even though the /g/
properly belonged to the previous morpheme. (Likewise, aŋrig-ga-ka "in [something] of a steward" would have been /aŋrig-ak-a/
[aŋ.ri.ga.ka]
.)
The exceptions, then, generally involve phonemes that weren't deleted in final position, such as š—the sign tuš ("sit") mentioned above, for example, never seems to have been pronounced /tu/
. But regularization is a powerful force, and the spelling tuš-ša₄ doesn't seem to have ever been considered incorrect, even if it never lost its final consonant.
Further reading: CDLI transliteration conventions, Foxvog's grammar