The long list of things that can make someone unclean, and how to remedy it, is daunting. The Israelites could be made unclean by what they ate, having babies (women), having a skin condition, and having normal ‘marital relations’.
We can explain some of it in terms of hygiene rules (some foods, the diseases, and touching carcasses). Any discharge is treated seriously. Blood is particularly serious, probably because of the symbolism of blood in the sacrificial worship system. Remember, it is important not to judge the standards of thousands of years ago by the freedoms we have from Jesus and modern medicine and technology.
The childbirth rule sounds odd, but on a practical level, an enforced 33-day or 66-day isolation after giving birth might not be such a bad thing for a woman in a group of desert nomads. It enforced rest (from work and men), possibly increased newborn survival rates, and possibly also reduced the risk of post-partum infection. There would have been large extended families to help look after a new mum. This time was described by God as ‘time of purification’ (12:4). Some cultures still have this time of rest for new mums.
But why would ‘lying’ with someone’s husband or wife make them unclean? This commentary suggests the idea was to very definitely separate sex from worship, and so separate the Israelites from the idolatrous religious practices of the pagan nations in the region. The Canaanites are usually singled out here. The idea wasn’t that sex itself was unclean, but that it could not happen anywhere near formal worship of God. There go the temple prostitutes of more than a few religions.
God’s explanation is:
11:45 For I, the Lord, am the one who brought you up from the land of Egypt, that I might be your God. Therefore, you must be holy because I am holy.
The rules, and compliance with them, come about because God had already rescued the Israelites. It is not a means of earning God’s favour. It is a response, and a means of staying in God’s presence.