YHWH takes a strong stance on defilement. He is Holy, and He cannot have sin in His presence. So when He puts His name on and makes His residence among the people of Israel, it is, must be, and must remain a big deal that the people remain pure. As much as God / YHWH is Love, even more so He is Holy.
So we come to chapter 5. God / YHWH makes it clear, that anyone who becomes defiled cannot be in the camp. They must reside outside of the camp. As such, anyone with leprosy, anyone with a discharge, anyone who has touched a dead person, anyone who was unclean had to be sent outside of the camp. So the Israelites did it. They sent them outside the camp. What’s amazing to me is that this is one of those things that the people of Israel continued to do. They didn’t just do this for a little while and stop. This separation of the defiled from the rest of the people of Israel extended up to the time of the downfall of the city of Jerusalem. We see in Jeremiah that when the Assyrian army was at Jerusalem’s doorstep, it was the leapers and outcasts that were outside of the city walls that went to the Assyrian camp and found that the army had been destroyed. Even when Israel had abandoned almost all of the other laws of YHWH, this is one that remained.
The second part (majority) of the chapter deals with a husband that suspects that his wife has had an affair. If a husband suspects that his wife (who is under his authority) has cheated on him, he has the ability to bring her to the tabernacle and have YHWH pass judgment on whether she has defiled herself. The priest offers a sacrifice and goes through a specific ritual including taking the dust from the floor of the temple and using it as part of a holy water for this woman to drink. The woman makes an oath that she has not been unfaithful and that if she has been, she will be cursed with her abdomen (stomach) growing big, her thigh (fertility) would waste away, and she would be a curse among her people. It was very shameful if she truly had disrespected her husband and marriage by coming out of her husband’s authority. If she had not, then she was truly justified in front of her husband, the priest, and all of Israel.