Richard Dawkins explains the similarity between reciprocity and sexual lust:
The selfish gene accounts for altruism toward kin and individuals who might be in a position to reciprocate your altruism.
Now, there is another kind of altruism that seems to go beyond that, a kind of super-altruism, which humans appear to have. And I think that does need a Darwinian explanation. I would offer something like this: We, in our ancestral past, lived in small bands or clans, which fostered kin altruism and reciprocal altruism, because in these small bands, each individual was most likely to be surrounded by relatives and individuals who he was going to meet again and again in his life. And so the rule of thumb based into the brain by natural selection would not have been, Be nice to your kin and be nice to potential reciprocators. It would have been, Be nice to everybody, because everybody would have been included.
It’s just like sexual lust. We have sexual lust even though we know perfectly well that, because we’re using contraception, it is not going to result in the propagation of our genes. That doesn’t matter, because the lust was built into our brains at a time when there was no contraception.
Here is my earlier post on reciprocity titled Why Are We Kind to Strangers?