4 This is the reason Joshua circumcised: all the people who came out of Egypt, who were males, even all the men of war, died in the wilderness by the way, after they came out of Egypt. 5 For all the people who came out were circumcised; but all the people who were born in the wilderness by the way as they came out of Egypt had not been circumcised. 6 For the children of Israel walked forty years in the wilderness, until all the nation, even the men of war who came out of Egypt, were consumed, because they didn’t listen to the voice of Yahweh. Yahweh swore to them that he wouldn’t let them see the land which Yahweh swore to their fathers that he would give us, a land flowing with milk and honey. 7 Their children, whom he raised up in their place, were circumcised by Joshua; for they were uncircumcised, because they had not circumcised them on the way.
Matthew Henry's Commentary on Joshua 5:4-7
Commentary on Joshua 5:1-9
(Read Joshua 5:1-9)
How dreadful is their case, who see the wrath of God advancing towards them, without being able to turn it aside, or escape it! Such will be the horrible situation of the wicked; nor can words express the anguish of their feelings, or the greatness of their terror. Oh that they would now take warning, and before it be too late, flee for refuge to lay hold upon that hope set before them in the gospel! God impressed these fears on the Canaanites, and dispirited them. This gave a short rest to the Israelites, and circumcision rolled away the reproach of Egypt. They were hereby owned to be the free-born children of God, having the seal of the covenant. When God glorifies himself in perfecting the salvation of his people, he not only silences all enemies, but rolls back their reproaches upon themselves.