The narrative of the war of the kings and the capture of Lot and the citizens of S'dom appears immediately after Avrohom and Lot parted ways due to a dispute about Lot's shepherds grazing Lot's flocks in land that was not his. (See Rashi from Bereshis Rabba on 13:7.) Chazal comment that when Lot departed from Avrohom, Lot chose to move to S'dom due to its licentiousness (ibid. v. 10), and that Lot totally renounced monotheism and referred nastily to Avrohom after Avrohom and Lot agreed to separate; 'I do not want Avrohom or his God', declared Lot. (Ibid v. 11)
Lot's behavior sheds light on the nature of Avrohom's test in fighting the four kings to save Lot and the people of S'dom. Whereas we read of Avrohom practicing chesed - kindness - throughout these parshiyos in the context of bringing people close to God, the unparalleled chesed that Avrohom displayed toward Lot in rescuing him was clearly not part of a 'kiruv project'. It was obvious that Lot was spiritually over the edge and religiously hopeless; nonetheless, Avrohom Avinu risked all that he had to protect Lot physically.
There is another very unusual aspect of Avrohom's battle with the kings. In order to rescue Lot and the rest of S'dom, Avrohom had to harm the aggressors, smiting many and taking numerous lives. Although the people of S'dom were evil, they were the victims in the conflict at hand, and Avrohom recognized this and took action against the aggressors to perform chesed to those who were helpless.
There are two very important lessons being taught here, and these lessons justify the central role that the Torah granted this narrative. Firstly, the mitzva of chesed in its true and ultimate sense is demonstrated, although it must have been internally challenging for Avrohom Avinu. Lot had just totally renounced Avrohom and all that Avrohom stood for, and Lot had associated himself with a group of infamous sinners. Despite this, Avrohom showed unmitigated, unlimited chesed to Lot, regardless of the fact that the chesed would not have any religious impact on Lot and was not likely to influence his ways at all. The chesed performed by Avrohom was pure; it was for a person who had clearly offended Avrohom and rejected everything that Avrohom taught; regardless of this, Avrohom performed chesed in the extreme with pure, altruistic motives.
A second lesson we learn is that being a ba'al chesed - one who does acts of kindness - means that one is calculated and assesses the situation, doing chesed to those in need and not rewarding or overlooking evil. Avrohom Avinu understood
that Lot was a victim and that the four marauding kings were aggressors. Avrohom evaluated the merits of the parties in the conflict and took action. Although his actions necessitated the taking of lives, it was just, as chesed must be just and righteous. Chesed that merely consists of pacifying is not genuine or laudable, for true chesed means doing that which is right.
Real chesed means acting with kindness when there is no other goal or reason; purity of motives is a must. True chesed means doing goodness to those who suffer or are in need; it does not mean being a 'push-over' or yielding to evil. Let's learn from Avrohom Avinu and make sure that we embody these critical lessons.