Because of the episode of the spies (see Numbers ch.13-14). See this link for details on this and other related topics :
http://Judaism.answers.com/kosher/the-complaints-in-the-wilderness-and-the-golden-calf
Forty years (Numbers ch.14)
Forty years.
God cursed the Israelites to wander the wilderness for 40 years as a consequence of their lack of faith and disobedience. This period served as a time of purification and repentance for the Israelites before entering the promised land.
because the Israelite's disobeyed God, that's why they had to wander for forty days in the wilderness
They had to wander in the wilderness for forty years (Numbers ch.13-14).
The learned Torah the entire time.
They perished when god made them wander in the desert for 40 forty years.
According to the Old Testament, the Israelites (the ancestors of today's Jews) wandered the wilderness (often mistranslated as desert) for 40 years. There is currently no archaeological evidence to support the claim that this event actually happened historically (see also the attached Related Link.).
Because God was reprimanding them after the events when the Scouts were sent to scout out the Holy Land. The Israelites did not exhibit complete trust in God (Deuteronomy ch.1). See Numbers ch.13-14. The forty years that God had them spend in the wilderness gave enough time for a new generation to be born; and it gave the nation time to completely learn and absorb the Torah, since they as yet had no other occupation.
They had to wander for 40 years in the Desert.
The book of exodus tells us about the wandering for 40 years.
It was the forty-year period (Numbers ch.14) that the Israelites spent in the wilderness before entering Canaan.