The three who became impure
צו את-בני ישראל וישלחו מן-המחנה כל-צרוע וכל-זב וכל טמא לנפש
Command the Jewish people to send out of the camp anyone with tzara’as, anyone who had an unusual emission, and anyone who is spiritually impure due to contact with the deceased
After the Torah describes the three different camps, the camp of the Shechinah, the Divine Presence, the camp of the Leviim, and the camp of the rest of the Jews, it immediately relates the inherent holiness present in these camps. These camps are concentric circles, with the camp of the Divine Presence containing the highest level of sanctity, and the camp of the Jews having the lowest level. Someone with tza’ras, a leprous-like spiritual malady with physical symptoms, would be sent out of all three camps. Someone known as a zav, who suffered an unusual emission from their body, would be sent out of the inner two camps. Someone who is tamei mes, spiritually impure due to contact with the deceased, is only sent out of the innermost camp.
The Sages connected these three people with varying degrees of impurity with the three cardinal sins. Someone with tzara’as is connected with idol worship. Someone with an unusual bodily emission is connected with forbidden relations. Someone who is tamei mes is connected with murder. More than this, the Sages connect these three people with the concept of exile. Now, perhaps connecting these people with the three cardinal sins makes sense. We could try to figure out the connection, even if it is not readily apparent. However, who said anything about exile? What does it have to do with these three people? Can we make heads or tails of this Midrash?
Perhaps the Midrash is trying to explain what this parsha is doing here. After the Torah delineated all the details of the Mishkan, the portable Temple, and that Hashem’s Presence rested within it, the Torah gave a warning to the Jews: Don’t do anything that will cause the Divine Presence to leave you. Our Sages teach us that the first Temple was destroyed because of these three cardinal sins, and with it the Divine Presence left us. Therefore, the Torah instructed that these three people be sent out of the camp. Each one of them has something about them that alludes to these sins, and thus the cause of exile.
Someone with tzara’as is associated with idol worship. Someone who has even a smidgen of heresy can be afflicted with this decease. When Moshe descended from Mount Sinai, he saw the Jews worshipping a Golden Calf. Our Sages teach us that the Jews at that moment became afflicted with tzara’as. Not only was the First Temple destroyed due to idol worship, but it was even connected to the destruction of the Second Temple. Even though the Jews weren’t guilty of idol worship during that time period, their main sin was baseless hatred and loshon hara, evil speech about each other. We are taught that loshon hara is comparable to idol worship. Sending out someone afflicted with tzara’as was to remove any smidgen of idol worship from the Jewish camp. He wasn’t allowed within any of the camps.
Someone who is afflicted with an unusual emission from their body is being sent a message. Their emission is a sign that they are overly promiscuous in forbidden relations. Promiscuity is the polar opposite of holiness. Therefore, he is decreed to be sent out of the holiest camp, the camp of the Divine Presence. He is also sent out of the camp of the Leviim, which itself has some level of holiness. The only camp he is allowed in is the camp of the rest of the Jews, whose holiness isn’t as high as the other two. The third person sent out is someone who became spiritually impure due to contact with the deceased. A loss of a human life is in a way a desecration of the Divine Image, as man is created in G-d’s image. Someone who associates with that is fitting to be sent out of the Divine camp, as a loss of life goes against Hashem’s honor.
Since these three things cause Hashem’s presence to leave us, namely idol worship, illicit relations, and murder, therefore they were commanded to leave the camps. These three are in some way spiritually impure, and there’s a hint to this idea in the word for spiritually impure, טמא. The ט, which has the numerical value of nine, alludes to murder. The person whose blood was spilled was in their mother’s womb for nine months. The מ, whose numerical value is forty, alludes to the forty days that it rained in the time of Noach’s ark. The primary reason for the flood was mankind was steeped in illicit relationships. Finally, the א alludes to idol worship. Someone who worships idols denies that Hashem is One, represented by the letter א.
Therefore, with the mitzvah to send these three out, the Torah hinted to us to distance from ourselves these three cardinal sins. These three things are what drives Hashem away from us. We need Him more than ever, so we should try our best to make Him accessible.
 Based on Kli Yakar to Numbers 5:2
 Numbers loc. cit.
 Bamidbar Rabbah 7:10
 The Kli Yakar proves this parsha was said on the 1st of Nissan, whereas Bamidbar starts with the 1st of Iyar (one month later)
 Yoma 9b
 Exodus 32:25
 Bamidbar Rabbah 7:4, based on the phrase העם כי פרוע הוא, which is analogous to the command for a Metzora to be פרוע ראש (Leviticus 13:45)
 Yoma loc. cit.
 Arachin 15b
 The Kli Yakar seems to be using the term שפיכות דמים more loosely. Usually it’s associated with murder (which is why it’s one of the three cardinal sins), but unless I misunderstood his intent, he’s referring to anyone who came in contact with death
 The Kli Yakar points out that this is why Dovid HaMelech referred to the יצר הרע as טמא (Sukkah 52a), as he himself stumbled in all three of these sins in some way. See there
 The Kli Yakar says this is why there are 9 ערי מקלט (6 which the Jews made when they entered the land of Israel, and three more which will be added in the future (Deuteronomy 19:9))
 See Bereishis Rabbah 32:5
 See Yalkut Shimoni Bereishis § 2