Shocked and angry
Shocked and angryiStock

There are mitzvot in the Torah that stand alone, not within any context. (Juxtaposition can be thought of as a context, but let's leave that as.)

The Torah tells us not to wear garments of wool and linen together. The mitzva of Shaatnez is just there. In its own pasuk. Not story. Same with the prohibition of milk and meat.

Other mitzvot we can call 'contextual mitzvot'. In Parshat Bo, all the mitzvot about Korban Pesach, Chametz and Matza, are woven together with the story of the Exodus. So much so, that we need the Oral Torah to tell us which details are 'just' part of the story of that night and which details are part of the mitzvot for all generations. Brit Mila is presented to us within the story of G-d and Avraham's relationship. (Actually, Mila is also a stand alone in Parshat Tazri'a.)
And in Parshat Sh'lach and Korach we find a third type of mitzva presentation.

In both of these sedras, the 'story' part takes up the major portion of the sedra - about two thirds.
And in both sedras, the 'story is followed by several mitzvah and mitzvot topics, that we can not help be see the connected to their story.

In Sh'lach we even find mitzvot presented that are counted as mitzvot elsewhere and are placed after the whole Cheit HaMeraglim affair to convey important messages.

So too in Korach. The story is about a challenge to the leadership and really to Hashem. Leviyim were complaining and demanding kohein status. People who were together Kohanim nor Leviyim who were challenging the authority of Hashem through Moshe.
The mitzvot that follow the story make it very clear that kohanim have certain rights and responsibilities, as do Leviyim. Leviyim have obligations to kohanim. Yisraelim have obligations to both kohanim and Leviyim.

Penalties and punishments for cross- ing the lines against halacha are very serious.

The 'story' of the Meraglim and the 'story' of Korach's rebellion are not just once-upon-a-time a long time ago stories. The Torah tells us of them because they impact on our lives as Jews and people.

So too with every story in the Torah. We have many lessons to learn.