The severe judgment passed on the generation wandering the desert serves as a heavy punishment for their profound lack of faith. The primary approach among commentators is that this event points directly to the failure of the spies. In response to their actions, God made a strict and binding oath against the Israelites [מצודת דוד, רד״ק]. The content of His oath was an absolute decree: the specific generation that had left Egypt would never be allowed to enter the Promised Land [ביאור שטיינזלץ].
Such an extreme and final punishment was necessary because the failure of the spies did not stem from a normal human weakness or a simple physical desire. Instead, it grew from a deep root of heresy. The hearts of the people had turned toward foreign beliefs and idol worship, revealing a total lack of trust in God's ability to bring them into the land. Because sins born from outright denial and rebellion are judged much more harshly than ordinary mistakes, this deep-seated lack of faith directly caused God to swear His oath and banish that generation from the land forever [מלבי״ם].