It’s about control, having the upper hand and being in charge of the narrative. All things that a narcissist typically want.
They use it to make themselves look better to others or to make you look bad, incompetent, or crazy. But when they try gaslighting you around the same people all the time, those people generally catch on to what's happening.
Especially when the narc gets lost in the lies of the gaslighting, forgets they said one thing a month ago and retells the same thing again but with completely different details this time. Even if people around you don't acknowledge these obvious gaslighting situations at the moment, they do notice them, they just stay quiet to avoid conflict.