Numbers 5:2 Command the children of Israel, that they put out of the camp every leper, and everyone that hath an issue, and whoever is defiled by the dead.
The Books of Exodus, Leviticus, and Numbers is all about the holiness of God. A human being may not even dare to approach the Lord without first being ritually cleansed, purified, and made holy. All the laws and rituals about clean and unclean, purity and defilement, and others, are given to remind us that God is holy, and we are not.
The people are to respond to this truth by putting out of the camp anyone who is ritually unclean or defiled. Having leprosy or an issue, or touching the dead makes one defiled and he cannot remain in the camp where God dwells. Other than contagion issues, there is nothing inherently wrong with these defilements. They are unclean because God says so.
The NT Christian also responds to a Holy God in his life by putting sin out of his life. We do this by daily repentance and faith, confession and absolution. Just as the Lord has provided a ritual way for the unclean to renter, so He provided the Blood of His Son as the way to come into God’s Presence. Repentance puts away the sin, and faith receives the right of access.