The narrative in Genesis runs in two scenes. In the first, Abraham argues God down from fifty righteous inhabitants to ten, a bargaining sequence that is one of the boldest passages in the Hebrew Bible, since the patriarch is holding the judge of all the earth to a standard of justice. In the second, two visitors arrive in the city, Lot presses them to shelter under his roof rather than sleep in the square, and the men of the town surround the house and demand them. Lot offers his daughters instead, which the text reports without approving, and the visitors strike the crowd blind and lead the family out before the destruction.
Where the meaning of the story is concerned, the Hebrew Bible itself is not silent. Ezekiel says plainly that the guilt of Sodom was pride, surfeit of food and prosperous ease, and that she did not strengthen the hand of the poor and needy. Isaiah addresses corrupt rulers as rulers of Sodom and links the name to bloodshed and injustice, and Jeremiah applies it to prophets who deceive. The Wisdom literature and Josephus emphasise arrogance and the refusal of hospitality to strangers.
Rabbinic tradition developed that reading into a portrait of a society that made cruelty into law: a city where giving bread to a beggar was a crime, and where a guest was measured against a bed and cut or stretched to fit. The offence, in that reading, is not one night's violence but a settled system of it.