Behold this wast the iniquity of ... Sodom: Pride, fulness of bread, and abundance of idleness was in her and her daughters, neither did she strengthen the hand of the poor and the needy. Ezek. 16: 49
But the height of their wickedness lay not in the activities of individual transgressors but in the fact that such iniquitous behavior was clothed with a cloak of legality, raised to the level of a social norm, as the Midrash seeks to underline:
They issued a proclamation in Sodom saying: Everyone who strengthens the hand of the poor and needy with a loaf of bread shall be burnt by fire.
Their wickedness was not committed in secret, as something to be ashamed of, nor was it the product of a spontaneous outburst of the populace provoked by irresponsible elements. It was rather the law of the land, and whoever violated this savage law, and performed a good deed, prompted by his own instincts of pity, was condemned to be burnt at the stake.
The men of Sodom said: How does this poor man live? When they ascertained the facts they brought her forth to be burnt by fire. She said: Sovereign of all worlds! Maintain my right and my cause at the hands of the men of Sodom! And her cry ascended before the throne of glory. In that hour the Holy One blessed be He said: "I will go down and see whether they have done altogether according to her cry which is come unto me"–and if the men of Sodom have done according to the cry of that young woman, I will turn her foundation upwards and the surface downward..."
There was no remedy for such a society but total destruction. ...the cry of Sodom is great...and their sin is very grievous.
(Leibowitz, Nehama. 1974. Studies in Bereshit (Genesis) in the Context of Ancient and Modern Jewish Biblical Commentary. Jerusalem: W.Z.O. Dept.for Torah Education., pgs 173-174)