Of all the sins we can commit, doubt is the one most hated by God. According to both Old and New Testaments, our doubting grieves the Lord, provokes Him, causes Him much pain. We see a prime example of this in ancient Israel after God had delivered His people from the hands of Pharaoh.
The Psalmist laments, "We have sinned with our fathers, we have committed iniquity, we have done wickedly. Our fathers understood not thy wonders in Egypt; they remembered not the multitude of thy mercies; but provoked him at the sea, even at the Red Sea" (Psalm 106:6-7).
The writer is making a confession here. What was the wicked sin that Israel had committed? It was their doubt that God would further deliver them, even after He had performed an incredible miracle for them at the Red Sea.
The psalmist is asking us to imagine God's people as they stood rejoicing on the victory side of the sea. The Lord had just performed one of the greatest miracles in the history of humankind, delivering Israel from the mighty Egyptians. Yet, how did these same people react as they faced hardship afterward? They doubted God's faithfulness.
The writer is saying, essentially, "Can you believe it? Our Lord had moved supernaturally on our behalf, delivering us from the enemy. Yet, even after this incredible miracle, we mistrusted Him. How could we ever provoke God that way?"
It was a different story altogether when Israel stood on the victory side of the sea. They sang and danced as they watched the mighty Egyptian army sink to destruction: "He rebuked the Red Sea also, and it was dried up: so he led them through the depths, as through the wilderness. And he saved them from the hand of him that hated them, and redeemed them from the hand of the enemy. And the waters covered their enemies: there was not one of them left. Then believed they his words; they sang his praise" (Psalm 106:9-12).
The Israelites sang the right song—a song of praise to almighty God—but they sang it on the wrong side of the sea. Anyone can sing and rejoice after they have the victory. But Israel had failed miserably on the testing side of the Red Sea. There they hadn't trusted God at all.