The initial meeting between Moshe and Pharaoh did not go well. The workload placed on the poor Jewish slaves was increased, and more importantly, the people's morale was shattered. Whereas initially, "the people believed, and they heard that G-d had remembered the people of Israel" (Shemot 4:31), as conditions worsened, "they did not listen to Moshe from shortness of breath and hard work" (Shemot 6:9).
Moshe is despondent, yet G-d tells him to go back to Pharaoh and demand the release of the people. As the reader eagerly awaits the next confrontation between Moshe and the monarch, the Torah digresses and lists the lineage of Moshe and Aaron.
The Jewish people are soon to be redeemed. The fact that those who were to lead the redemption all came from one family is no coincidence. In listing the genealogy of Levi, the Torah is hinting as to the crucial importance of their background and laying out the players who will shape the future of the nation.
Of all those mentioned, only the life spans of Levi (137), Kehat (133), and Amram (137) are mentioned. The Seforno (6:14) comments that Levi was the last of the brothers to die and thus, he had time to teach his children, something that was repeated with Kehat and Amram. The extra years that each lived (and put to good use)—and no one else heretofore had a longer lifespan—is that which enabled them to produce Moshe, Aaron, and Miriam.
Those who will have no role in the development of the nation are glossed over. So while Aaron's children and even (some) of the grandchildren are mentioned, Moshe's are left out. They were "victims" of the tragic and all-too-common fate of the children of great leaders, who are pale reflections of their illustrious parents.
We are introduced to Korach, who played a significant role in shaping our understanding of Jewish leadership. We also meet his children, who demonstrate that no matter what one's surroundings may be, one can always rise above them. "And the children of Korach did not die" (Bamidbar 26:12), as they rejected the path of their father. In an ironic twist of fate, it is Korach and not Moshe who produces children worthy of emulation.
Interestingly, we are told the names of Korach's children only in our parsha. As per the norm in the Bible, names are much more than a means of identification. Korach's eldest was named Asir, which connotes both the words lasur, "to stray", and asur, "bound up". Asir managed to stray from the "derech" of his father, thereby escaping his fate. This theme is further developed in son number two, Elkanah, "jealous for G-d". While Korach was jealous of his cousins, desiring power for his personal needs, his children saw the wastefulness of such pursuits. We must be jealous—for the honour of G-d; any personal power we may have is to be used to help others, not ourselves. Son number three was named Aviassaff, "my father gathered". Korach gathered together 250 people to challenge Moshe. His children understood that "any gathering that is for the sake of heaven will endure" (Avot 4:14), while those gatherings not for the sake of heaven will not. Korach was swallowed up by the ground, leaving nothing—not even his possessions—behind.
The names of Moshes' youngest cousins, Mishael and Eltzafan are mentioned here; we will meet them again when they are tasked with removing the bodies of Nadav and Avihu from the Holy of Holies. The deaths of Nadav and Avihu are shrouded in mystery; we cannot quite comprehend what they did that would warrant such punishment. The enigma of their deaths is alluded to in the names of their cousins. MiShael, "who asked", alludes to the notion that G-d has asked for His holy ones back; that we cannot understand why, is reflected in the name of Eltzafan, "the ways of G-d are hidden from us". And the third brother—one not mentioned in connection with the deaths of Nadav and Avihu—was named Sitri, "it is hidden". Perhaps he too played a role in retrieving the bodies, one hidden from others.
The listing of the genealogies, far from being a digression from the actual storyline, serves as the background to it. We are introduced to those who will redeem the people, and the special character traits they possessed: independence of thought, overflowing chesed, great role models, and a recognition that G-d's ways are hidden from us.
 It is noteworthy that before tekiat shofar, we recite Psalm 47 seven times—with its introduction of laMenazeach leb'nai Korach Mizmor, "for the conductor, by the sons of Korach,a song". It is their example of teshuva that our tradition wants us to recall as we prepare to hear the sounds of the shofar.