Parshas Shemini begins with the inauguration of the Mishkan, the tabernacle, and the death of Aharon's two sons for offering Aish Zar, an alien fire, which G-d had not commanded.
The obvious question is why did Aharon survive his role in the Golden Calf, which was idol worship, while his sons died for merely taking the initiative in making a change to the Divine service?
And why does G-d's response focus on "holy and the common, and between the unclean and the clean" and then shift to an extended list of kosher and non-kosher animals, described as unclean, and then purity and impurity, before finally returning to the death of his sons six chapters later?
Impurity and uncleanliness exist as part of the cycle of life. A non-kosher animal is only bad if you eat it. Impurity is only bad if it taints something pure which then goes on to taint something holy.
Impurity in a human being can be removed, in part through the procedures laid out in the Torah. It becomes a severe sin however when impurity taints holy objects in the House of G-d. Chanukah was a severe crisis because the Bait Hamikdash had been thoroughly desecrated. At the lowest points in Jewish history, Jews not only worshiped idols, but brought them into the Temple.
The Golden Calf could be destroyed. And after repentance, the Jews could return to G-d and even be honored by having G-d dwell among them in the Mishkan constructed with their own hands. Aharon could preside as the Kohen Gadol, the High Priest, despite his role in it. Because G-d does forgive and cleanse human beings of their sin. If He did not, we could not exist.
The severest sin is one that prevents this from happening by tainting the holy with the impure. Perverting the religion of G-d is worse than idolatry because it does not give people any place to return to. Idol worships can return to G-d. But when the Temple is tainted or the religion is tainted, the process of returning becomes more difficult because there is 'nowhere' to return to.
Idolatry creates "alternatives" to G-d. Tainting the worship of G-d however obscures His presence.
Offering an "alien fire" seems like a minor offense, but it leads to innovating alien religious practices, hijacking the worship of G-d and replacing it with a manmade religion that culminates in idolatry. The offense of Aharon's sons seems minor, out of context, but we should view it in the context of the decline of the Jews into idolatry once in Israel. Purity is a mandate, but also a metaphor.
The worship of G-d must be what He commanded. When the highest figures in a religion pervert it, then ordinary people find themselves cut off from G-d. Aharon's sons made a mistake, but like Uzzah, the seemingly minor act revealed a more dangerous error in thinking about G-d.
The Kohanim, the priests, are holy because they follow the commands of G-d. Their exclusive role however allows them to pervert and exploit their position, as indeed would happen later on. Purity, both physical and intellectual, is demanded of the priesthood because their special position allows them to either bring the people to G-d or to cut off the people from the worship of G-d.
Above all else, the details of the service, like the Kosher status of animals or the purity of people, matters because G-d commanded it. Its core holiness is defined by the source of that holiness, G-d. It is G-d who defines what is pure and impure. When those who are meant to help the people transmit and understand the word of G-d, mangle it instead, they render it impure.
The culmination of G-d's instruction to Aharon after the death of his sons is, "that you may teach the children of Israel all the statutes." (Vayikra 10:11) Service is the implementation of G-d's word. The fundamental role of those who serve G-d closest must be purity of service and teaching. Respect for G-d is not just an abstract idea, but an understanding. Touching the ark or bringing an alien fire shows a fundamental misunderstanding of what G-d is and disqualifies one to be in a position of religious authority.
Closeness to G-d requires greater purity because it is those who are close to Him who help define his presence for the people and help purify them. In this area, a taint that is hard to detect can be more severe than a grievous sin. A pig is deemed more un-Kosher than animals that lack any of the signs of the Kosher animal, because its hooves deceive one into thinking that it is a Kosher animal.
A Kohen who invents his own service is less obviously doing wrong than one who makes an idol. And yet this is also what makes it a worse sin. One does not see impurity. It is more subtle than the difference between Kosher and non-Kosher animals. And yet it is worse sin to desecrate the holy with impurity than to eat non-Kosher food.
It is the role of the Kohen and of religious leaders to mark these distinctions. When the Kohen corrupts the process, then he endangers the connection between G-d and the people.
When G-d mentions the death of Aharon's sons again, in Vayikra 16, it is at the beginning of the Yom Kippur service, the Day of Atonement. It is easier for people to atone and repent when they have role models and religious leaders to guide them. The ultimate purpose is closeness to G-d. And the Kohanim must remain pure in order to make G-d accessible to the people so that they may be cleansed.