To understand the book of Bereshit (Genesis) one must understand the history of the Jews. They had been enslaved prior to the time of Moses. Where they came from before that time is debated by historians, as is how they ended up enslaved by the Pharaohs. Moses led them out of bondage with the help of a God called Yaweh.
The escape of Moses and the Jews from Egypt occurred in the book of Shemot (Exodus), the second book in the Tanakh. This means the book of Bereshit was carried as an oral tradition among slaves. They would have been forced to worship the Pharaoh as a god. The clandestine effort to preserve their stories meant the book was written down after the Exodus.
To further complicate matters, after Moses escaped it is likely the priest of Yaweh, and indeed the master himself, were overcome. Here’s why. Moses went up to the mountain and was given the 10 Commandments. They are derived from 9 commands listed in the Egyptian “Book of the Dead.” The Sabbath was the addition. The one out of body who Moses was talking to on the mount was Egyptian, not Yaweh. He and his sorcerers then played god to Moses and made sure he didn’t survive to the promised land. They simply led him and his people around in circles until he died and took on the role of being their god.
Another thing to consider is how these stories came to be. Understand there are no gods, angels, demons or devils. There are only people who know how to use energy. They reincarnate like the rest of us. Some of them play at being gods or god.
Understanding the victors write the history books, and the religious books, should also help. At the very least they rewrite the books. You’ll notice the changes in the Tanakh itself, and later the rewriting of it by the Romans (Catholic and Orthodox) and the Muslims. Realize they are obsessed with destroying the Jews, and their original book. They want to destroy Israel and any more ancient writings that might be lying around.
The story of Sodom and Gomorrah has a backdrop to it. In Bereshit (Genesis) Chapter 14 there is a battle where Sodom, Gomorrah, Admah, Zebolim and Bela are attacked by 4 other city states. Sodom and Gomorah were sacked by Chedorlaomer and his allies. Lot, Abraham’s nephew, resided in Sodom. When Abraham heard the news he attacked and defeated Chedorlaomer and returned the goods looted to Sodom and Gamorrah.
Bereshit 14:21 “And the king of Sodom said to Abram, ‘Give me the souls, and the possessions take for yourself.'” He wanted to keep his people’s souls to be reborn in his city.
Abraham politely refused saying he raised his hand to his Lord but would not take any of the possessions. The souls would be in the captivity of Abraham’s lord.
In Chapter18 Abraham’s Lord comes to him with three men. Abraham slaughtered a calf and had Sarah cook for the men. The Lord told them they would have a child (Sarah had been barren) after he returned to them in the following year. He told Abraham that he would make him king of the nations. He also said he would destroy Sodom and Gomorrah.
Abraham, to make sure he would take no blame, protests for 10 verses (23 – 33). He beseeched his lord not to kill the righteous. The city is of course destroyed.
Two men, supposedly angels, came to Lot’s house and he took them in. People of the city came and demanded entrance so they could rape the strangers. Maybe these two “angels” had been coming to the town out of their bodies and raping the people’s wives. Possibly possessing people and raping children.
Lot supposedly offered them his daughters but the two men blinded the people. They then warned Lot to escape with his family. Soddom and Gomorrah, were destroyed by the Egyptian army with an incendiary attack using an incendiary attack (see brimstone). Lot left but his wife looked back on the town and was turned to salt. Her soul would have been taken to the land of Abraham’s Lord along with the others. Abraham and his Lord had successfully made this soul harvest appear to be a righteous endeavor. Lot escaped with his two daughters whom he supposedly later bore children with. He was no longer a credible threat.