The divine decree following the sin of the spies seals the fate of the older generation while simultaneously shaping the future of their children. The impending period of wandering serves not merely as an act of atonement, but as a complex transition where the parents' failures intertwine with the next generation's preparation for entering the Land of Israel. The primary approach among commentators is that the children would endure a life of instability, moving from place to place without a permanent home, much like shepherds seeking pasture. However, this shepherd-like existence indicates that even within the punishment, God continued to guide the nation and did not abandon them [שד״ל]. Furthermore, this period of wandering was designed to bring about profound growth and nourishment [רש ר הירש]. Offering a surprising contrast, another perspective suggests that the children were actually the ones who would spiritually shepherd and sustain their parents. Because the older generation was condemned to die in the wilderness, God would not have performed miracles solely for them; therefore, the manna that sustained the nation fell entirely in the merit of the children [מלבי״ם].
The prolonged stay in the desolate and dangerous desert had a specific educational purpose. It was meant to train the nation to take a place of darkness and impurity and transform it into a holy settlement. Mastering this spiritual transformation in the wilderness prepared the Israelites to successfully navigate and elevate the physical world they would soon encounter within the Land of Israel [חומש קה״ת].
The duration of this punishment was set at forty years. A large group of commentators [רש״י, מזרחי, ברטנורא, ברכת אשר] explains that this specific number was carefully calculated as an act of mercy to protect the people from an even harsher fate. The decree applied to those who were twenty years of age and older. By adding a forty-year delay, God ensured that no one would die before the age of sixty. Passing away before this age is considered a severe spiritual punishment of being prematurely cut off. God desired that the older generation die a natural death as a result of the decree, rather than suffering this harsh spiritual excision. The calculation of these forty years actually includes the first year following the Exodus from Egypt. The decree of wandering had already been conceived in the divine mind since the sin of the Golden Calf, but God waited to enact it until the nation entirely filled its quota of wrongdoing with the sin of the spies [רש״י].
As a result of this decree, the younger generation was forced to carry the heavy burden of their parents' disloyalty and deviation from God's path. The parents' actions—most notably their rebellion, their idolatry at the Golden Calf, and their desire to return to Egypt—are characterized as a profound spiritual betrayal [ספורנו, אבן עזרא, פענח רזא]. Had the parents not rebelled, the children would have entered the land immediately; instead, they had to endure decades of waiting [ביאור יש״ר]. Because the older generation refused to accept the immense responsibility of living in the Land of Israel under God's direct and revealed providence, that very burden was forcibly transferred onto the shoulders of their children in the wilderness [העמק דבר].
Despite the immense difficulty of this delay, the waiting period ultimately served the children's highest good. It functioned as an intensive period of spiritual education for the entire nation, allowing them to fully absorb the spirit of the Torah and learn to trust God with absolute certainty [רש ר הירש]. From a completely different angle, mystical teachings offer a profound alternative understanding of the children's role. In this view, the children were actually the reincarnated souls of the parents themselves, returning to the world in a new generation to correct their own previous flaws and finally fulfill their ultimate destiny [שפתי כהן].