Is the purpose of this story to tell us that Abraham was a coward lacking in faith that he would use his wife to protect him from death? No, God brought Abraham there to teach Abimelech a lesson.
This incident gave Abimelech a good dose of humility as well and that’s a lesson we would do well to learn. It’s more pleasant to learn from other people’s mistakes than our own.