After the Egyptians surrendered and agreed to release the Israelites, God hardened their hearts. Only if the decision was truly an expression of repentance would the Egyptians agree to emancipate their slaves. Otherwise, the Egyptians would be filled with arrogance and seek to enslave the Jews again. And so it was. The Egyptian army chased the Israelites, and caught up with them near the Red Sea. When the Israelites saw the Egyptians, they screamed out to God. God responded that they should act to save themselves, by entering the sea, rather than cry for help. Under Moses' leadership the people entered and a great miracle occurred. The sea split and the Israelites passed through it on dry land, with the Egyptian army in hot pursuit. When the last of the Israelites emerged from the sea, the waters returned to normal, and the entire Egyptian army was drowned.
Ordinarily, a miracle is not something desirable. God created nature and its rules so that people would use their abilities to harness its laws in the best way possible. Despite this, in order to reveal to the world His might, His providence, and the protection of His nation, God struck the Egyptians with the ten plagues, split the Red Sea, and led His children through it.