By Rabbi Moshe Pogrow
Hashem revealed to Avraham His decision to destroy Sedom and its neighbors. It is explicitly stated that He did this because Avraham was destined to become the ancestor of the people who would inherit the land. As an individual, Avraham did not need to be told the reason for the destruction. After all, his very life was a contrast to the spirit of Sedom, even the way Hashem spoke to him: sitting at the entrance of a tent in the heat of the day, on the lookout for weary travelers, pleading with strangers to accept his hospitality as though they were doing him a favor. He did not need to be commanded to avoid the ways of Sedom. There was no need to warn him.
But it was necessary to warn his descendants. When they inherited the land, it was necessary to ensure that Avraham’s children would not become like Sedom; to ensure that they never lost sight of the way of Avraham, serving Hashem and loving their fellow man; to ensure that their wealth never erased the spirit of Avraham from their consciousness. In short, it was necessary to preserve the eternal distinction between Avraham and Sedom.
The next few pesukim tell us that when the nation serves Hashem properly, He rewards us with benefits in this world: abundant rain and crops. If we stray, however, rain will be withheld, crops will not grow, and we will be exiled. The Rambam explains that true reward and punishment is in Olam Haba. But if we show Hashem that we really want to keep His Torah, He will remove difficulties from our path. We will not have to worry about livelihood. On the other hand, if we show that we don't care about Torah and mitzvos, He will take away our opportunity to keep them by making life more difficult.
Adapted from Emunah in the Classroom