Hashem creates needs and voids before providing solutions, so that humans experience genuine gratitude rather than taking blessings for granted.
The ultimate purpose of creation, challenges, and exile is to cultivate deep awareness and thankfulness toward Hashem.
The 42 stops of the Jewish travels in the desert correspond to the 21 days of the Three Weeks, each day having a dual nature (day and night), reflecting the paradigm of lack followed by fulfillment.
Moshe Rabbeinu was effectively “set up” by Hashem — who placed the wrong rock — to prevent him from leading the Jews into Eretz Yisrael, since anything Moshe did would last forever, making future exile impossible.
Yehoshua Bin Nun, corresponding to the moon (with its cycles of waxing and waning), was the appropriate leader to bring the Jews into Israel, allowing for future exiles and returns.
Personal growth requires challenge, failure, and recovery; gratitude to Hashem is the central theme of Jewish existence and the ultimate state of eternity.