When we do a person a favor, we tend to like them more as a result. This is because we justify our actions to ourselves that we did them a favor because we liked them.
Benjamin Franklin himself said, "He that has once done you a kindness will be more ready to do you another than he whom you yourself have obliged."
The reverse effect is also true, and we come to hate our victims, which helps to explain wartime atrocities. We de-humanize the enemy, which decrease the dissonance of killing and other things in which we would never normally indulge.
Wikipedia also has this effect covered.