רמב"ן
Ramban on Deuteronomy 8:5
Q — How does "כאשר ייסר איש את בנו" function in the flow of the parsha? Ibn Ezra reads it as a parenthetical aside: keep mitzvot DESPITE the desert hardships — the yissurim are a distraction to be ignored, and the schar of keeping mitzvot is entering ארץ ישראל. But the surrounding verses then describe the bounty of the Land — why?
A — Ramban: the yissurim of the midbar are not a marginal distraction but the very PURPOSE — "ה' אלהיך מיסרך... שתערב לנפשך טובת הארץ ופירותיה." The desert's deprivation was designed to make the goodness of Eretz Yisrael sweet to Israel's palate when they entered. The yissurim are pedagogical preparation for the Land, not an obstacle to be endured around.
כי כאשר ייסר איש את בנו - שיתן עליו לטובתו עול מוסר, כענין שנאמר 'יסר בנך כי יש תקוה ואל המיתו', כן ה' אלהים מיסרך מתחילה בעינוי המדבר ונסיון המן, שתערב לנפשך טובת הארץ ופירותיה.