G-d revealed to Abraham his plan to wipe out Sodom and immediately Abraham began praying for its survival. What is difficult to understand is that Sodom’s lifestyle was diametrically opposed to Abraham’s way of life and teachings. Yet, Abraham still tried to save them.
Rabbi Moshe Feinstein explains that often people preach kindness, but they get angry and hate those who dispute their values because their kindness is coming from the love that they have for themselves. Avraham’s kindness was based on his love for other people. It is true that the people of Sodom were doing wicked acts, but Avraham loved them and therefore anger and animosity did not play a role in whether or not to pray for them.
When doing acts of kindness out of love the kindness will continue even when it’s hard and difficult for us. This type of selfless kindness really can help us become greater people just like Abraham.