There is a large body of research demonstrating and delineating the complex moral instincts of young children, including babies far too young for these to have been socialized into them. Babies exhibit empathy, fairness, justice, and the ability to judge “goodness” and “badness” of human behavior.
Some of these emotions, such as disgust and outrage, can fuel either compassion or cruelty. Even empathy has the potential to fuel aggression, as when someone’s empathic identification with an in-group victim leads them to exact revenge on a perceived out-group perpetrator.
What appears to motivate this kind of altruistic behavior is intense empathic distress—a literal case of “I feel your pain.” Neuroscientific experiments indicate that in humans, the same emotional brain circuits are activated when we ourselves feel pain and when we observe others feeling pain. Empathy is a very physical reaction and is closely related to unconscious mirroring behavior or imitation. It is frequently automatic and involuntary, such as when we wince or flinch when we see someone get injured.
Unbalanced, indiscriminate empathy would not have been adaptive for evolutionary survival. Natural selection in primates has produced both empathy and aggression, as well as cooperativeness and competitiveness.