Therefore, they fasted for forty days, signifying by that period of time that abstinence from the love of temporal things is necessary, for those constant fasts for so many days, that is, for forty days, indicate this. For that same reason, the people of Israel were led through the desert for forty years before they entered the Promised Land to rule over it. So we, too, in this life where there is the utmost anxiety, where there is fear, where there are dangers from temptations, are being led, as it were, through a desert by a temporal dispensation.
Source: Sermon 252, Section 11