What is the Pasuk coming to teach us? What is the significance of the comparison to a father chastising his son?
Ramban: Like a father places on his son the yoke of Musar (teaches him ethics) for the son's benefit, 1 so too, was Hashem chastising Yisrael, with the afflictions of the desert and the test of the Manna, so that they would ultimately appreciate the goodness of Eretz Yisrael and its fruit. 2
Seforno: Just like a father who chastises his son, Hashem chastises Yisrael (not with the intention of harming them, but) in order to prompt them to attain the level of perfection that He expects of them.
Refer to 8:2:1:4.
Sha'arei Teshuvah (4:13): Your difficulties and afflictions are not according to your great sins, Hashem chastises like a father, amidst His mercy. Your heart knows your actions, and the afflictions that I brought on you are not according to your deeds.