God doesn't always step in to save us from ourselves or prevent us from sinning. But in Genesis 20 He did intervene.
This is now the second time Abraham has lied about his relationship with Sarah out of fear. It's also worth noting that our passage says Sarah kept up the deception as well. Though the Bible teaches that wives are to submit to their husbands, they are absolutely not supposed to follow them into sin. Our allegiance to God and His ways has to be our highest priority.
The reason God intervened is quite simple - there could be absolutely no doubt that Abraham was the father of Isaac, so there could be no hint of Sarah having any other sort of sexual relationship with anyone else. This time, God intervened.
We cannot count on God to intervene when we are sinning, or for Him to allow us to escape the consequences of our actions. We reap what we sow, and despite there being grace and forgiveness, there is still repercussion for sin. We don't sin in a vacuum. Our sin hurts people around us, always. Abraham and Sarah's sin hurt Abimelech, his wife, and his female servants. Not to mention the damage we do to God's reputation when we, who claim to be His followers, fall into sin.
We cannot become complacent about sin. We must always be vigilant!
Tomorrow's Bible In a Year Passage: Genesis 23:1-24:51, Matthew 8:1-17, Psalm 9:13-20, Proverbs 3:1-6