Exodus 14:5
And it was told the king of Egypt that the people fled: and the heart of Pharaoh and of his servants was turned against the people, and they said, Why have we done this, that we have let Israel go from serving us? And it was told the king of Egypt that the people fled: and the heart of Pharaoh and of his servants was turned against the people, and they said, Why have we done this, that we have let Israel go from serving us?
Word that the people had fled reached the king after Israel had been gone some days, after the Egyptians had buried their dead from the slaying of the firstborn and the judgments had ceased, with the report saying they would never return to serve him again. The report arose because Israel kept going toward the Red Sea instead of stopping in the desert to worship, so Egypt now read the departure as a permanent escape and judged the earlier release as folly. The turning of the heart was mourning regret for permitting Israel to leave, asking why they had freed Israel from serving them, because being deprived of that service and labor was counted a very great loss. Despite all they had suffered under God's judgments, they were hardened by continual rebellion and long resistance and obstinacy, refusing to admit the bereavement was a visitation and judgment from God and explaining the plagues and the death of the firstborn as natural events rather than God's power.
Behind the question lay the wish to regain Israel's labor, to redeem Egypt's glory for yielding to a despised God and avoid derision from other nations, to intimidate Israel by a grand display of power and greatness, and trust that priests of idol gods going with the army would make success more sure. On those grounds Pharaoh with his servants, counselors, and mighty men decided to bring Israel back by force into Egypt, gathering a very large, well-equipped army of rulers, great men, the mightiest men, and priests, with horses and chariots equipped for war, including six hundred chariots. God knew beforehand that Pharaoh would pursue and directed Moses where to encamp before the sea so that He would be honored before Pharaoh and all his host. Leading Israel around through the wilderness of the Red Sea rather than by the near way of the Philistines lest they turn back at the sight of war showed Him compassionate as well as a God of judgment, and the Red Sea was the appointed place for His final display of power.
The pursuit overtook Israel while encamped by the sea and shut them in between the Red Sea ahead and the mountains beside them and the Egyptian host behind, leaving no visible way of escape. That closing in filled Israel with terror and drew a shout of triumph from the Egyptians at having them in their power. Yet hardness and rebellion then led the Egyptians to rush into the miraculously prepared path and be utterly destroyed.