The Torah was "edited" with great precision. Narrative and law are often intertwined; one sheds light on the other. While our tradition teaches that the entire corpus of Biblical Law was given at Sinai, many, if not most, of the laws are recorded in multiple places in the Torah, each instance of repetition adding nuances and shadings of meaning. The principle of ein mukdam umeuchar baTorah, events in the Torah are not necessarily chronological, reflects this notion. Rashi often asks the question lama nismacha? What message can be derived from the fact that a particular segment of the Torah follows on the heels of another? As Nechama Leibowitz, zt"l, notes, the underlying assumption of such a question is the fact that the events listed did not occur sequentially. The Law can be properly understood and appreciated only in its proper context. Often, there is more to the Law than meets the eye.
The Torah records mitzvoth relating to the sacrificial order, laws that take effect only "when you come to your homeland that I am giving you" (Bamidbar 15:2), immediately after the story of the decree of aimless wandering and death in the desert due to the sin of the spies. While they would not live to see it, the Jews of the exodus could gain comfort from G-d's immediate assurance that their children would enter the land. Even the mitzvah of tzizit, which concludes the parsha, can be seen as an antidote to the sin of the meraglim. They could not see the full goodness of the land; but the tzizit are there to ensure that "when you see them you shall remember all of G-d's commandments... vlo taturo, do not be led astray after your hearts and eyes” (Bamidbar 15:39), hinting at the failed mission of the meraglim, who were charged with the task of latur et ha’aretz.
Moving to this week's parsha, the commentaries debate when the story of Korach took place. Most assume that Korach fomented his rebellion immediately following the episode of the meraglim. Moshe, having finally shlepped the Jews out of Egypt (and they did have to be shlepped) with promises of leading them to the land of Israel, was weak and vulnerable; after all, the people were to die in the desert. What better time to attempt a coup? The rallying cry of Korach was one of democracy and egalitarianism, in which leaders are relegated to a merely perfunctory role. "All the people in the community are holy… Why are you setting yourself above G-d's congregation?" (Bamidbar 16:3). It took no less than four "miracles" and the death of approximately 15,000 people to quell the rebellion.
The Ibn Ezra, however, maintains that Korach's rebellion actually took place much earlier, when the "rights" of the firstborn were given to the Levites, who did not participate in the sin of the golden calf. Korach, an eldest son himself, rallied those from the tribe of Reuven, the firstborn of Yaakov, a group upset at being denied their special rights; a number of Levi’im, angry at losing some of their rights to the Kohanim; and 250 "men of rank", a description that the Ibn Ezra understands as referring to those who were firstborns themselves.
In truth, Judaism upholds two seemingly contradictory positions: that of equality for all, and that of responsibilities being determined by birth. It is how they are defined and applied that is crucial. One who is born a Jew is born into a covenant with certain responsibilities. And the entire community must work together to actualize the covenant; each member—while sharing the vast majority of duties with all others—has certain distinct obligations devolving upon him that are determined by birth, and others by the choices we subsequently make. Thus, men and woman, Kohanim, Levi’im and Israelites, the firstborn, those living in Israel, farmers, the wealthy, the poor, and widows, all have slightly differing mitzvoth which apply (or don't apply) only to them.
It is no coincidence that the mitzvah of pidyon haben, redeeming the firstborn son, is recorded after Korach's rebellion was over. It is not one's position at birth that is truly important. Rather, it is what one does with one's life that gives it meaning, that redeems that life. While the law in theory distinguishes between a firstborn and his siblings, the Biblical narrative, beginning with Hevel and continuing through Yitzchak, Yaakov, Moshe Rabbeinu, David Hamelech and beyond teaches that birth order is really unimportant. Moshe and Aharon were chosen, not due to circumstances of birth, but because of their development through life. "All the nation is holy". Some are able to develop that holiness to higher and higher levels.