But love your enemies, do good, and lend, hoping for nothing in return; and your reward will be great, and you will be sons of the Most High. For He is kind to the unthankful and evil. Therefore be merciful, just as your Father also is merciful. Luke 6:35-36.
God understands something that is not natural for the human heart—it is in our best interest to treat others, not as they treat us, but with mercy, love and kindness. Our natural reaction is to respond with like. As someone yells at us our natural reaction is to yell in return (either vermally or mentally). If someone wrongs us, we somehow act as if two wrongs do make a right.
If someone is responding contrary to their natural inclination, this is evidence that the power of the Holy spirit is touching his/her life. In ourselves, the Bible explains, we can find no good thing. We can, for a length of time, refrain from the response that our nature proposes. Education, training and genetics all have their influence, but it is only the power of God in the life of a human that can make a lasting, growing change.
In short, the change happens by what we allow our minds to feed on. Or, by beholding we become changed.