The angels said, "...we are about to destroy this place [Sodom] , for the outcry before G-d has increased, and G-d has sent us to destroy it."
The wickedness of Sodom and its neighbors was a misguided overreaction to Noah's flood. The generation of the Flood had been wiped out chiefly because they practiced and condoned robbery -- the forceful and unjust taking of one person's property by another. The residents of Sodom, aware of this, declared private property rights absolute, outlawing charity and hospitality as unjust uses of another person's possessions.
In their zeal, the people of Sodom did not realize that this was just as destructive as condoning robbery. So, since the world cannot fulfill its purpose of being G-d's true home if we human beings cannot get along with each other, Sodom and its neighbors had to be eliminated, just like the generation of the Flood. Nonetheless, since their intentions, however warped, stemmed from a desire to do the right thing, we are told that these cities will be restored in the Messianic Era.
We can learn from this that our challenge is to find proper balance rather than live a life of extremes.
From Daily Wisdom