This is why Joshua circumcised the men: After the Israelites left Egypt, all the men old enough to serve in the army died in the desert on the way out of Egypt.
It had been thirty-eight years from the time we left Kadesh Barnea until we crossed the Zered Valley. By then, all the fighting men from that time had died, as the Lord had promised would happen.