Which is literally exactly what you did.
Empathetic responses are stronger with regards to ingroup than outgroup members. It also encourages group members to act in a prosocial way towards other group members.
I still find the concept of empathy, spontaneously adopting the emotions of another individual and feeling them myself, to be horribly intrusive sounding, gross almost. It sounds like a massive infringement on the emotional state of another.
Then why bother to allow someone else's to intrude at all? It just seems very invasive. Why is not recognizing them and responding accordingly not enough?
It seems far less selfish to me to be able to respond to the pain of another out of legitimate care for their well-being, without empathy, than to respond with the interest of ceasing one's own vicarious pain.
Also, you are perfect. <3
The success of predators is often linked to their success in anticipating their prey. In some ways, this means they adopt the prey's cognitive behaviors to some extent in order to hunt them more effectively. It may be instinctual, observational and not quite the same as the more familiar form of empathy, but might be similar to cognitive empathy.
There's a Darwinian explanation for some of it, perhaps.
Emotions, I suspect, come before thoughts and the reasoning we pride ourselves in using. I don't think we can think the way we do without the language to do it with. We can get into ego and other psychology, I guess, but this is generalized conjecture. I get the impression that we are looking at the whole thing backwards or top-down, when the process really is down-up. Again, makes it look like consciousness (and maybe moreso ego, now) is yet again the culprit for confusion.
Cognitve empathy, of which theory of mind is a component, is a necessity for survival. Autism spectrum disorders are characterized by a lack of this type. I would not argue against its benefit. I am, and I believe TPG, is referring to emotional empathy in the above posts since it is what we more commonly think of when the term is used.