A person who does favors to others is not so popular as a person who asks for favors.
A person who has done someone a favor is more likely to do that person another favor than they would be if they had received a favor from that person. Similarly, one who harms another is more willing to harm them again than the victim is to retaliate.
In his autobiography, Franklin explains how he dealt with the animosity of a rival legislator when he served in the Pennsylvania legislature in the 18th century:
Having heard that he had in his library a certain very scarce and curious book, I wrote a note to him, expressing my desire of perusing that book, and requesting he would do me the favour of lending it to me for a few days. He sent it immediately, and I return’d it in about a week with another note, expressing strongly my sense of the favour. When we next met in the House, he spoke to me (which he had never done before), and with great civility; and he ever after manifested a readiness to serve me on all occasions, so that we became great friends, and our friendship continued to his death.
Example how it works: Subject A does not like subject B. Subject B asks A for a simple favor which he can not deny. Since Subject A agreed on that favor, his brain has a cognitive dissonance: “I don’t like Subject B” and ” I did a favor to Subject B”. Since our brains try to reach harmony, we will transform the first proposition to “I like Subject B, since I do favor only for people I like”.
One application of this principle is the Foot-in-the-door technique. It’s about asking for smaller things before going for a greater request.