Instinctive altruism, acquired in the course of our evolution, especially the mother’s for her child, can serve as a basis for more extended altruism, even if that was not its initial function.
This is in a sense tricking our functions to do other things than the were intended.