Parshas Vaeira begins with G-d appearing to Avraham as three angels come bearing news, news of the imminent conception and birth of a child and the destruction of Sdom. The destruction of Sdom has long ago passed into our lexicon, yet Sdom appears to be the only city that G-d actively destroyed in the Torah, since bringing the flood. Not the cities ruled by Nimrod, nor even Pharaoh's Egypt, which was marked but not destroyed.
What therefore made Sdom so uniquely vile that it required the personal intervention of G-d to destroy it? It could not have been mere corruption and evil, because that was not so unique. Even the Caananites, who were expelled and destroyed, were not destroyed in a massive spectacular event as Sdom was.
In Pirkei Avot we are told that Midat Sdom was Sheli sheli ve'shelcha shelach, What is mine is mind and what is yours is yours. On the surface this may seem somewhat ungenerous but overall not all that hideously unreasonable.
When Avraham rescues the fallen Kings and Lot, the King of Sdom makes him an offer, Ten Li Et HaNefesh Ve'Et HaRechush Kach Lach. Give me the Souls (the people) and take the wealth for yourself. In other words the King of Sdom was making Avraham a seemingly fair offer, you take what's yours (the loot) and I'll take what's mine, the people.
Yet Avraham refused the offer, rejecting any division with Sdom. Avraham did not practice Sheli Sheli Ve'Shelach Shelach. Instead he unselfishly gave up what he had a right to, to the King of Sdom. That is because Avraham represented the opposite of the selfish approach of Sdom. Vaiera begins with Avraham hurrying to give of himself to his guests. Just as with the Kings, Avraham gave of himself without expecting anything in return. Sdom by contrast believed in full value.
Thus when Avraham and Lot part, Lot chooses Sdom. Why Sdom? After all Lot enriched himself in Egypt and could have gone back there, if it was only wealth that he was after. The description of Sdom a pasuk later gives us a clue. It tells us Ve'Anshei Sdom Roim Ve'Hatoim LeHashem, And the People of Sdom Were Wicked and Sinned to G-d. Now Roim VeHatoim LeHashem can be read as, Were Wicked and Sinned to G-d or Were Wicked and Sinned For G-d.
In Zecharia 14, we have the wicked who enslave and sell and proclaim Asherani, Baruch Hashem, I am Enriched, Blessed be G-d. The Gemara in Berachos 14 says that even the thief breaking into a house through a tunnel calls on G-d.
Why did Avraham and Lot split? Because Lot's shepherds insisted that G-d's promise to Avraham and Avraham's childlessness meant that they were entitled to the land. Thus like the thief, they believed in G-d only when it came to their own profit, but not when it came to giving unto others. Avraham by contrast believed in G-d when it came to giving to others.
Thus Sdom was a perfect destination for Lot, because the people of Sdom believed Sheli Sheli Ve'Shelach Shelach, fair trade, capitalism and taking from others. They were prepared to thank G-d and praise him when they enriched themselves but were not prepared to give to others. And thus they were Roim Ve'Hatoim LeHashem. They Were Wicked and Sinned For G-d.
This explains the otherwise odd Pasuk when Hashem states Zaakat Sdom Ve'Amora Ki Rabba.... Erde No Ve'ere HaKitzakota Haba Alai Asu Kala Ve'Im Lo Eidoh. The Outcry of Sdom and Amora is Great...Let Me Descend and See If Like the Outcry That Comes to Me They Do And if Not I Will Know.
This seems strange. Does G-d really need to descend down and see and what is the outcry? If it is the supposed outcry of Sdom's victims, why is no one besides Lot and his family saved? And why does G-d need to compare the outcry with what they actually do? Such comparisons are usually necessary when there is reason to suspect that something is untrue or false. What is there for G-d to suspect false?
The Tzaka, the outcry, is not that of Sdom's victims but of the Sodomites themselves. It is they who raise the outcry, the thief who calls out to G-d in his tunnel and the slaver who praises G-d. Thus G-d would descend down and see if the people of Sdom were genuinely as righteous as their outcries sounded or if they were as wicked as their deeds and sins made them out to be. Because as bad as sins are, sins in the name of G-d, Roim VeHatoim LeHashem are worse. A sin desecrates the world but those who sin in the name of G-d destroy all sources of morality and law. A thief is one thing. A thief who appears to be legitimized by G-d is a true abomination.
This is why Avraham pleads for Sdom by listing possible Tzaddikim, righteous men in the cities, for perhaps it is these righteous men who raise the outcry and not the sinners. For if it is the righteous men who cry out to G-d, then Sdom is not lost. If it those who are both wicked and self-righteous then Sdom truly is hopeless because those who are both wicked and self-righteous are unable to repent because they cannot admit error.
The essence of Sdom was its selfishness, its premise of Sheli Sheli Ve'Shelach Shelach. This marked their homosexuality, for homosexuality is itself narcissistic and indeed narcissism was the original diagnosis for homosexuality. Rather than creating something, it is about selfishness, gender interacting with its own gender. Homosexuality too proclaims, Sheli Sheli Ve'Shelach Shelach embodying a single sex world devoid of procreation or true relationships of opposites. Indeed homosexuality is the very opposite of diversity.
Even Lot's own family was permeated by this Sodomite vice of selfishness. Lot's wife turned back to look and was transformed into salt. What is salt? Salt preserves. Salt is inherently selfish. Then Lot and his daughters escaped only to form an incestuous relationship and incest too is the essence of selfishness, making the family of Lot seemingly irredeemable.
Yet from Moav comes Ruth who redeems this selfish trait that had crept into the family of Lot by way of Sdom and even from beforehand when Lot decided that he would inherit Avraham and that he was therefore entitled to take what he wanted, having faith in G-d only when it profited him. And Ruth discarded that selfish attribute when she proclaimed to Naomi, Amecha Ami, Your People are My People. In doing so Ruth left behind the selfishness of Moav, enabling a descendant of Lot's family to rejoin the family of Avraham at last becoming an ancestor of the Family of David and the final inheritors of the land. Thus Lot's dream of inheriting the land was at last fulfilled but only when a descendant of his finally redeemed herself by discarding the selfishness of Sdom.