Abraham was hanging out by the trees of Mamre in the afternoon and the lord appeared to him. The lord had two dudes with him. The lord is kind of like a mob boss that way.
When Abraham saw the trio he hurried over and bowed low, saying, hey stop a while, let me provide you with food and water and then continue on.
God said, sweet, that sounds nice. God, as I have commented before, seems to be a sucker for food and drink.
So Abraham told Sarah to get cracking on some good bread while he ran out and picked some choice meat from his flock. His servant prepared this calf, and Abraham took it and some curds and milk to the god squad who were waiting. They ate and Abraham stood nearby, in the customary waiterly position of a gentle host.
"'Where is your wife, Sarah?' they asked him."
He told them she was in the tent. Still making their bread I suppose. God replied, oh yeah, I will be back a year from now, and she will bear you a son. Sarah was listening at the door of the tent, and when she heard this, the third or fourth promise that god was going to give her a kid, she laughed to herself. She was past childbearing age, and had waited a long time for it, and now god was mentioning it again, and she thought, great, I don't have ENOUGH problems already with my arthritis!
God asked Abraham--not Sarah--why Sarah had laughed at the prospect of a child. He wondered aloud to Abraham if there wass anything too hard for the lord to be able to do. Then reassured him that she will indeed have a son in a year.
Sarah said, I didn't laugh!
God said, oh yes you did!
As god and his posse were walking away, and Abraham was walking with them to see them off, god wondered aloud whether he should tell Abraham what was going on and why he was here. This sounds like an incredibly patronizing thing to do, but okay. He figures after all that he should give Abraham the low down.
They are standing on the hill looking down at the city of Sodom and god tells Abraham that there's an outcry against the city, and its sister city Gomorrah, about the sin that was happening there. It was distressing people, I guess. God says he is going to the cities to see what all the fuss is about, and if people were exaggerating the sinfulness.
His henchmen start to leave but Abraham stays with the lord and says, but would you destroy the entire town just for a few wicked idiots? What if there are 50 good people there? Will they be treated the same as the criminals? Surely not!
God replies, all right Abraham, if I find 50 righteous people in Sodom, I will spare the whole place.
Abraham pushes it a bit further. What if there are 5 less than 50?
God says, I will spare the place for 45 good people.
This continues, the haggling, until finally Abraham reaches the number that is apparently god's threshold for righteous outweighing evil: 10. If there are ten righteous people in the city of Sodom when he goes to visit it and view the wickedness for himself, he would not destroy the town.
So god went on his merry way, like an IRS agent of sin come to repossess the town of Sodom, and Abraham went back home thinking he may have saved his nephew Lot's family, who lived in Sodom. Again.