The prophet Ezekiel blamed Sodom for arrogance and ignoring the poor
The word sodomy comes from Genesis, yet the Bible never pins one sin on Sodom. Ezekiel faults the city for pride, plenty and neglect of the needy; Jeremiah names adultery and lying; some scholars see a breach of hospitality. Even the English word bugger traces back to a medieval Bulgarian heresy.
The term reached English through Church Latin, where the phrase for the sin of Sodom goes back to the Greek name of the city. In Genesis 18 and 19, two angels lodge with Lot, a mob demands the visitors, and the city is later destroyed; Abraham's attempt to bargain for it fails. The link with homosexuality grew from the mob scene. Several scholars argue the original writers cared chiefly about the violation of hospitality, which mattered enormously in their world, and the Book of Wisdom, canonical for Catholic and Orthodox Christians, stresses that failure too.
Elsewhere the Hebrew Bible mostly uses Sodom as a showcase of divine power without naming a crime. Where prophets do specify, the charges vary: Jeremiah cites adultery and lying, and Ezekiel 16 compares Judah unfavourably with a Sodom guilty of arrogance, excess food and careless ease while the poor went unhelped, with no explicit sexual sin in the list. The King James rendering of Deuteronomy 23:17 adds confusion: its word sodomite translates the Hebrew qadesh, which has nothing to do with Sodom and which the New International Version renders as shrine prostitute. The Epistle of Jude does add a sexual element, but what its phrase about strange flesh means is disputed.
Languages have pulled the word in different directions. Modern German Sodomie and Polish sodomia mean bestiality only; Norwegian sodomi covers both senses; French, Spanish and Portuguese cognates refer specifically to anal intercourse and are used in everyday speech, not just in courtrooms. Arabic and Persian liwāṭ refers to the people of Lot rather than Lot himself.
Bugger has a stranger pedigree. It comes via French bougre from the Latin for Bulgarian, a label once pinned on the Bogomils, a heretical sect from 10th-century Bulgaria, and on the related Albigenses of France. Buggery first appears in Middle English in 1330 meaning heresy; the sexual sense is not recorded until 1555. The mild British insult sod descends from sodomite, while sod meaning a clump of earth is an unrelated word. Legally, the term now survives mainly in Africa, Asia and the United States, where such laws have sometimes been struck down.
Source: Sodomy