Abraham said, “I did it because I thought, ‘There is no fear of God at all in this place, and they will kill me because of my wife.’
Genesis 20:11 ESV

Most of Abraham’s experience in Canaan was near Sodom, and we know from the story of Dinah two generations later that the people of this region truly were wicked and were prone to treating people, especially visitors, as property to be taken, used, and traded at will.

Abimelech was probably looking for an alliance with Abraham, just as Shechem was with Jacob. If he had thought Sarah was Abraham’s wife, then there is a much better chance that he would have killed Abraham and taken his wife as a hostile takeover of Abraham’s domain, not simply as an act of sexual desire and violence.

Abraham trusted God that Sarah would be restored to him, but I think this still showed a lack of trust that God would also preserve his life. He couldn't become the father of nations if he was dead, but God had promised, so God would not have allowed Pharaoh or Abimelech to kill him.