Loneliness inhibits empathy because it induces in its wake a kind of self-protective amnesia so that when a person is no longer lonely they struggle to remember what the condition is like.

“If they had earlier been lonely, they now have no access to the self that experienced the loneliness; furthermore, they very likely prefer that things remain that way.  In consequence they are likely to respond to those who are currently lonely with absence of understanding and perhaps irritation.”

—Robert Weiss, Loneliness: The Experience of Emotional and Social Isolation

The Lonely City: Adventures in the Art of Being Alone