Rav Hirsch explains on Vayera 19:4 that the people of S'dom were not bisexual, but that they were attempting to so mistreat the guests that noone would ever dare commit such a crime in the future.
Practising hospitality was such a grave crime, that an example was to
be made on the strangers who had been invited in, to make it
impossible for the recurrance of such an attempt to be made. That
showed the inhumanity. And this mishandling was to take the form of
the most bestial debauchery. That showed the immorality.
The fact that every group in the society came to enforce their law showed that it was not a matter of sexual desire, but a preplanned thought out method of ensuring through terror that noone else would ever dare challenge S'dom again.
Rashi and Rav Hirsch then explain in Vayeirah 19:8 that he was telling them that he had asked them under his roof and extended them his protection. He was taking the idea of hospitality and extending it to the utmost absurdity. Because he had asked them into his house, he was telling the people of S'dom that he was willing to have them murder his daughters in the most fiendish way rather than turn over guests while they were under his protection. In fact, it seems to imply that once the guests left his protection they would be free to be handled as the people of S'dom wanted.
The idea was that he expected them to agree to leave his guests alone as long as they stayed in his house and offered his daughters to show how serious he was about the matter. He also showed that he trusted them to keep their word.
8 Behold now I have two daughters who were not intimate with a man. I
will bring them out to you, and do to them as you see fit; only to
these men do nothing, because they have come under the shadow of my
roof."
Rashi
because they have come: Heb. כִּי עַל כֵּן. Do this favor in my honor, because
they have come into the shade of my roof [lit. my
beam]. The Targum renders: בִּטְלֵל שָׁרִיתִי, in the shade of my
beam. The Targum of קוֹרָה, beam, is שָׁרוּתָא.
Rav Hirsch
כי על כן באו, for I am asking this (not as an act of benevolence on
your part) but only therefore because once I have asked them in they
are under my protection. Do it for my sake.