Why do narcissists have to punish you? by Dr. Elinor Greenberg

When you do something that makes them feel disrespected, it goes into the low self esteem pan. The heavier that pan gets, the more they start to doubt their worth and feel like a “loser,” a piece of worthless garbage.

By punishing you, they regain their sense of power and repair the insult to their self esteem. The scales are now rebalanced again in the way they like, with all the proof of their specialness (and your worthlessness) rerighting the scales so the high self esteem pan is full again and their confidence is restored.