In the ancient world, the greatest crime you could commit was a crime against hospitality.
Yes, I just said that being inhospitable was the ultimate crime, and, moreover, one that could bring the wrath of the Gods upon you. In ancient Greek mythology, there is the story of an innkeeper who violated the law of hospitality by murdering (and possibly cooking) his own guests. Rumor of this behavior reached the Gods on Mount Olympus, causing Zeus himself to come down and investigate. Well, to make a long story short, the fool of an innkeeper didn't realize that his guest was a God, and ended up in pretty hot water when he tried to do away with his latest guest at the inn. Unsurprisingly, it is a theme that is repeated quite frequently in Greek mythology: host betrays guest, and the Gods get really pissed-off.
A secondary theme in some of these tales is how the Gods often disguise themselves as mortals. While they never outright disclose the fact that they are Gods, mortals are expected to figure it out based on the subtle (not sometimes not so subtle) hints They give out. Dead trees might suddenly spring to life, strange things happen... the usual stuff. Mortals who witnessed such things, and who failed to treat the God with the Godly respect due Him, usually ended up in big-time trouble.
The concept of hospitality worked something like this:
A traveler would show up on your doorstep requesting lodging for the night. Hospitality dictated that you welcome the traveler into your home, offering him food and bed for the night, and when he left in the morning, that you gave him a gift before sending him on his way. One would assume that the gift was something useful on the road, such as bread and dried fruit or cheese, or maybe a wine skin filled with the good stuff.
The reason for this was simple. Homesteads were few and far between, and so were marketplaces where travelers could replenish their stocks. Nights spent in the open wilderness were dangerous. Wolves might attack, or highwaymen. Hospitality was a way of making the road kinder to people who had to travel for some reason of another.
I will say it again; hospitality was sacred.
So now, lets look at the story of Sodom and Gomorrah. On the surface it appears to be a story about two towns that fell so badly into perversion that God Himself decided they had to be wiped off the face of the earth. The story, however, sounds too familiar, and too like those found in other mythology to be simply a tale of two pervert cities. The angels disguised as men arrive in the town and are not recognized for who and what they are. The townsfolk seek to abuse and harm them, instead of offering them safe accommodations. In fact, the townsfolk are depicted as loathsomely as the hospitality-criminals of Greek mythology (who were largely murders and cannibals).
I am going to put it to you that the way the townsfolk are characterized is reflective of what Hebrew society viewed as loathsome, just as the criminals in Greek mythology were reflective of what the Greeks viewed as loathsome. The Hebrews viewed people who practiced sexual licentiousness as particularly revolting, while the ancient Greeks were disgusted by murders and cannibals. However, the moral of the myths in both cultures seems to be that only the types of utter cretins who engage in such acts would dare to treat travelers in such an inhospitable manner. If you have the gall to enrage the Gods by not offering hospitality to travelers, then you are nothing more than a murdering, sexually perverted cannibal. Or at least you deserve to be called one.
And you're probably too stupid to recognize a God when he's on your doorstep, or that your hubris is such that you don't care if the traveler you're abusing is a God who can blast the shit out of your city. Hubris does, of course, mean that you've got the balls to challenge the Gods... .
Like so many other biblical tales, the story of Sodom and Gomorrah is likely just another example of how Hebrew lore appropriated existing tales, and then altered them to reflect a Hebrew-centered world view. In many cases, the tinkering also served to reinforce uniquely Hebrew ideas that were quite alien to the spirit of the originals, as in the tale of Adam and Eve. That tale began life as a story about two humans- both male - tricking the guardian of a sacred grove and robbing it of a sacred artifact. In the Hebrew version,however, it is the humans who are 'tricked', and even more strangely, the human pair are now a man and a woman. Maybe not so strangely, because the narrative is twisted in such a way that the blame falls squarely on the shoulders of the woman who could not resist temptation and then tricked her husband into sin. In other words, in Hebrew hands, the tale becomes a vehicle for a Patriarchal system, something the original story never dreamed of postulating.
The Hebrews, it seems, were the great plagiarists of ancient world, lifting the stories of their 'forefathers' almost wholesale from Babylonian traditions. It is now believed that the great men of ancient Judah and Israel were, in fact, kings and great men of surrounding nations whose stories and lives had been appropriated by the Hebrews.
The moral of this story is, if you want to continue to believe in the Hebraic myth of 'the chosen people', don't read 'The Epic of Gilgamesh', or become familiar with the other myths and legends of the ancient world. If you do, you'll quickly see that the Hebraic version of events is just a knock off of earlier tales.