William Hamilton advanced the selfish-gene theory as an explanation for altruism (though Dawkins gets more credit for the idea now); that we are altruistic to people who share our genes because it's the
genes themselves that are 'attempting' to survive rather than the vessels which house them.
The implications of this are that we are more altruistic to people with a greater degree of genetic relation to us, less so to those more distant, with unsettling implications for a twentieth century wracked by ethic division.
I always remember the story of
George R. Price's reaction to this theory - he was so disturbed that he attempted to counter his 'instincts', giving away his money, taking in the homeless and especially attempting to 'do good' to those people much more genetically distant from himself (mostly using ethnicity as a marker). However, it was no good ultimately, because he simply didn't 'feel' the instinctive level of kindness he was chasing, and so he committed suicide by cutting his carotid artery with a pair of scissors.
True ethics are not instincts. Instincts are fallible and misleading, holding no wisdom whatever and attempting to drive us in directions which often bear no relation to our conscious thoughts and desires.