I've heard this interpretation a couple of times from non-historian academics. Is there any truth to it?
There's a case to be made for that, even though it might sound strange. Like I'd call a mob wanting to rape your guests a little more than inhospitable, but those making the hospitality argument are doing so based on trying to make sense of the story against the background of social etiquette from the time.
In the story itself there is no mention of the exact sins of Sodom and Gomorrah but God has judged the city for destruction and the attempted rape happens just before it. Obviously the storyteller wants to craft Sodom as a completely wicked place... so you find in the story that EVERY male in the city has come to rape the man's guests, and that God would be willing to spare the city if even 10 righteous men are found in it (Abraham pleads God down to this number, Gen. 18).
Notice one bit of the story at that point, in Gen. 18.20: "And the Lord said, Because the cry of Sodom and Gomorrah is great, and because their sin is very grievous". That term "the cry" is used throughout the Bible. In the Hebrew Bible it reads like this: "ADONAI said, "The outcry against S'dom and 'Amora is so great and their sin so serious". It is the same cry/outcry heard from the blood of the innocent Abel killed by Cain, the same cry/outcry heard from the Israelites slaving in Egypt (see Exodus). This suggests it is the victimising of certain people and that Sodom and Gomorrah's sin might be nothing to do with homosexuality as has been traditionally interpreted, and more to do with exploitation or violence. Ezekiel 16:49 seems to confirm this:
"'Now this was the sin of your sister Sodom: She and her daughters were arrogant, overfed and unconcerned; they did not help the poor and needy..."
Though the quote continues to mention "abominations", a word elsewhere applied to homosexuality and other things prohibited in the books of Deuteronomy and Leviticus, this first part ("arrogant, overfed and unconcerned; they did not help the poor and needy...") has led some to conclude the Sodom and Gomorrah are judged for the same things that Egypt and Israel itself are judged for, accumulation of wealth at the expense of the exploited, a constant refrain in Scripture.
Other mentions of Sodom and Gomorrah, or Admah and Zeboiim, in the Hebrew Bible don't detail the crimes, rather Sodom and Gomorrah have become a byword, a memory of a wiped out people. In the Christian New Testament it is mostly the same, a passing reference related to some other judgment but 2 Peter 2.6-7 does mention the depraved acts Lot witnessed in Sodom, and Jude 1.7 has it that "Sodom and Gomorrah and the surrounding towns gave themselves up to sexual immorality and perversion."
In both these cases notice that the image of Sodom and Gomorrah's destruction is accompanied by other examples from Genesis. 2 Peter says:
For if God did not spare the angels when they sinned, but cast them into hell, delivering them in chains to be held in gloomy darkness until their judgment; if He did not spare the ancient world when He brought the flood on its ungodly people, but preserved Noah, a preacher of righteousness, among the eight;…
Jude says:
Though you already know all this, I want to remind you that the Lord at one time delivered his people out of Egypt, but later destroyed those who did not believe. And the angels who did not keep their positions of authority but abandoned their proper dwelling--these he has kept in darkness, bound with everlasting chains for judgment on the great Day.
And then they both mention Sodom and Gomorrah. It is a series of stories of judgment used for the purpose of declaring God's judgment and salvation to their contemporary audiences. What they find to be Sodom and Gomorrah's actual sins is a matter of what they perceived them to be at a much later date than the passage from Ezekiel, where many more layers of Jewish tradition and then Christian interpretation had been added to their vision of the ancient traditions and the meaning of the stories.
I have never found the 'hospitality' reading of the story particularly compelling, but that might be because it is so often repeated without giving justification for it. You'd expect the case to be made from other writings that attest to hospitality codes, but many authors just say it without giving that evidence. I expect they do so to avoid the simplistic and moralising reading of homosexuality being the sin in the story. But they fail to deal with rape being a little more than inhospitality. By the way, I haven't said yet but very few people would debate the meaning in the word "know" as "to have sex with" but there are some who would debate it is about rape at all.
There are many more interesting interpretations that come from scholars working in biblical hermeneutics, such as interpretations that highlight the female characters of the text, or ones that go further into the reading I elaborated above about Sodom and Gomorrah being exploitative and callous in the model of Pharaoh's slavery system or Solomon's slavery system, imperial cities who exploit and plunder. Exegesis of the words in the story has not got much further than the options I have mentioned, there is not much to glean from the story and the are different interpretations in the other scriptures.
Others will highlight how these stories we already a result of a process of retelling and retelling even before they were written down so many years after the events they purport to describe, and that the memories, morals, myths contained in them are discernible but not easy to pin down to one clear meaning. Possibly it was just a matter that the places know to the Israelites as Sodom and Gomorrah were laid waste for one reason or another and so stories grew from the rubble and became an image with storytelling value. Whether it was always tied to the stories of the ancestor Abraham or was meshed into them from other stories is not known, but we do know that particularly in the first seven books of the Bible, and particularly in Genesis, that kind of cross-pollination of stories happened.