These legal matters were meant to protect the purity of the Israelites, their priests, and the tabernacle. Purity here refers to being clean and set apart for worship.
These rules helped the people remember who they were. Israel was a theocracy (a nation ruled directly by God). God was their true king.
Moses served as God’s main spokesman. Through him, God gave laws and instructions to the people.