It is a natural outgrowth of genetic replication in a world of finite resources. Morality must begin at the lowest common denominator to suffuse an entire system. Compassion protects a whole system that includes the compassionate by virtue of the compassionate feeling value in the details of that system.
Compassion is an inclusive nurturing instinct.
It begins with the self and extends outward according to one s sense of self. The First Rule, do unto others as you would like to be done unto, is the rule of conduct between those who would collaborate, regardless of species. If I eat Joe, his friends may suffer the loss of Joe s good will towards them. Thus threatened, they will eat me. Complex creatures such as humans are actually mobile mounds of symbiotic microorganisms.