Abraham should have been punished for his sins because he lied about his wife.
He said that his wife was his sister. Abimelek realized that Sarah was Abraham's wife.
He gave Abraham some money and a place to live. This is called mercy.
Abraham prayed for Abimelek and God healed Abimelek.
This history is interesting. I believe God was teaching Abraham to have faith. Abraham's faith was lacking and God was teaching Abimelek to fear him.
14 Then Abimelek brought sheep and cattle and male and female slaves and gave them to Abraham, and he returned Sarah his wife to him. 15 And Abimelek said, “My land is before you; live wherever you like.”
16 To Sarah he said, “I am giving your brother a thousand shekels of silver. This is to cover the offense against you before all who are with you; you are completely vindicated.”
17 Then Abraham prayed to God, and God healed Abimelek, his wife and his female slaves so they could have children again, 18 for the Lord had kept all the women in Abimelek’s household from conceiving because of Abraham’s wife Sarah.