At the end of the previous aliyah, and continuing in this, the fifth aliyah, G-d gives the laws of drink offerings and flour offerings accompanying certain sacrifices. It may be asked: what are these doing here right after the story of the spies and the punishment decreed on the Jews because of it?
It says in the Midrash that after these events the Jews become depressed and begin mourning their mistake and their destiny to wander and die in the desert. They reason further that perhaps even their children will make a mistake too and our people will never reach the land. Chassidus teaches that depression may not be a sin, but it is worse than any sin, because it can lead to all the other sins. So G-d asks Moshe to cheer up the Jews and told him to do this by teaching these mitzvahs which apply mainly in Eretz Yisroel. In this way, the Jews will be confident that their children will reach Israel to do these mitzvahs.