The ancient Hebrew, confronted with the fact that Sodom was destroyed (earthquake and fire), wondered “what did those people do to be punished like that?” As Beduins, they would consider being inhospitable to a stranger a very bad thing. And what could be worse than that? Why being inhospitable to an ANGEL! And what is the meanest thing you can to to a stranger? Rape them. And so we get this neat episode in the Abraham saga. To make his point, Ezekiel came up with a different story about the demise of Sodom, blaming it on what he felt was the worst thing a society could do, namely disregard its weakest members.
Failure to understand the nature of the story is why one group will yell that the Sodomites were homosexuals and the other side will yell back what Ezekiel said. As I see it, nothing is known about the real Sodomites, beyond the desctuction of their city in the earthquake c. 1900 BC. The various stories in the Bible are the reflections of the cultures who confronted the destruction and either wondered why it happened, or wanted a symbol to use in making an argument.
Sodom was a symbol of whatever the viewer considered the ultimate social evil.