This is the reason Joshua did so: All the people who went out of Egypt, that is, all the men who were soldiers, had died in the desert on the way after they left Egypt.