Many of the narcissists I’ve known were raised by and traumatized by narcissists. They need the feeling of being right and making yourself the center of things, because they’d never gotten that as a child. The narcissistic parent demanded all that for themselves. Many of these “secondary narcissists” seem to work in helping professions. They want to contribute and perhaps be seen as “good” but don’t really have the emotional skills to do so. This is, of course, anecdotal to the ones I’ve known but it does seem to be an interesting pattern.
You can still have compassion for someone while backing away and also wishing that they’d go get some healing and help.