The cities of the Plain.
The Hebrews at that time were still in hill country of places now on the border of modern Israel and had yet to conquer the Caananite(cities of the plain) and Philistine cities. Our idea of Sodom and Gomorrah has come to us through the prism of the Hebrew bible. Canaanites and others were seen as foreign and as enemies of the Hebrews . The early jews were also in the process of nation building and for centuries fought to keep their people from taking up or reverting to the larger and more widespread religions and city cultures that surrounded them. So in effect, we are seeing a clash of cultures and somewhat of an early propaganda war at work here. The early part of the Old Testament is all about keeping the Hebrews(and their sometime foreign born wives) together as a people and preventng them from adopting the practices of the (often) more dominant cultures around them. This process of keeping the Hebrews together as a people, is less evident in the later Old Testament, because by then, the Israelites had become the dominant culture in Palestine.
Bugger is believed to originate from Bulgar.
In the middle ages Western Europeans regarded Bulgars as heretics and up to all sorts of 'unnatural practices' .
Hence bugger, buggery, bugger off!.
The corresponding word in French,' 'bougre', doesn't have the sexual connotation, but means something like 'fellow' ', as it also can in English.
Meanwhile back in Sodom and Begorrah--ie Ireland, I have heard it rumoured, that in the past, anal sex was used by some to avoid having children. In the, now thankfully increasingly dim and distant past, when contraceptives - due to the overpowerful influence of the Catholic Church, were illegal in Eire. Some Married couples with no access to contraception enaged in anal sex to avoid the woman falling pregnant especially if they already had a large number of children.
Of course, in those less than enlightened days, how much say the woman may have had in this is debatable.
10,000 years of Middle Eastern civilisation and the place is not at peace but rather in pieces.