This is the cause why Joshua did circumcise: all the people who came forth out of Egypt, who were males, even all the men of war, died in the wilderness by the way, after they came forth out of Egypt.
Another explanation is that most of the older generation simply neglected to circumcise their sons out of forgetfulness, discouragement, or for some other reason.