One of the distinguishing characteristics of Sefer Bamidbar (and perhaps Vayikra too) is that it alternates between stories and laws, several chapters of each at a time. While often no historical or chronological connection between adjacent stories and laws is apparent, it is accepted that there is a usually a clear thematic connection.
The most commonly cited case is in our parsha, which describes the spies who "tour" Israel, and the people's punishment for wanting to return to Egypt based on their report. These stories are followed by the mitzvah of tzitzit, which warns us not to "tour" with our evil inclinations, and reminds us that God "took us out of the land of Egypt to be our God" - implying that returning to Egypt means rejecting God.
Before the mitzvah of tzitzit are several other mitzvot - the "mincha" and libation offerings which much accompany animal sacrifices, and the separation of "hallah" - whose connection to the spies story is less clear. Admittedly, each of these laws is prefaced by "When you come to the land [of Israel]", and as Ibn Ezra and Ramban explain, this is an implied comforting promise that the next generation at least will reach the land. But is this preface really sufficient reason for all the laws to appear next to the spies story? To ask the question differently, what is the connection between the preface and the laws being prefaced?
Based on the preface, Chazal conclude that mincha and libations were not offered in the desert (at least by individuals). I would like to argue that beyond this textual reason, there is a clear practical reason why the laws could not have applied.
In the desert the Israelites had relatively many domestic animals. The tribes of Reuven and Gad had "many cattle" and chose their inheritance based on its pasture land (Bamidbar 32). Other tribes had fewer, but presumably not zero animals. Perhaps these animals were not enough to supply a sustainable diet of meat, hence the complaints in Behaalotecha. But they sufficed for slaughter and consumption on special occasions, or for a few sacrifices in the Mishkan.
While the people possessed some amount of meat, they apparently had no access to grain or wine. There is no indication that they performed any farming in the desert. Their main sustenance came from manna. Little rain falls where they were, watering crops with well or spring water would have been difficult, and planted crops might have to be abandoned at any time for an unannounced journey. If the Israelites had any wheat or wine, it likely came from trading with neighboring peoples. But the quantities that could reasonably be traded for were small.
In these circumstances, it makes sense that no mincha or libation offerings were required with sacrifices. It would be reasonable to ask Israelites to bring animal offerings. But they would find it almost impossible to bring wheat or grape products at the same time. Thus the mincha and libation laws did not apply in the desert. Hallah, too, depends on grain and could not have been separated in the desert.
Only upon reaching the land of Israel, where wheat and grapes were staple foods, would the laws take effect. As punishment for the spies episode, the people could not enter the land of Israel. But by studying and teaching these laws, they could prepare for the entry in the next generation. People who fail at a task often obtain some consolation when their children succeed at the same task. This is the comfort offered to the people by these laws, and the reason for their placement immediately after the story of the spies.