Some like to take issue with the fact that a woman who bears a child is seen as impure in the eyes of God (through the Mosaic Law). Such feelings arise from a misunderstanding of both the text and ancient ANE traditions. Ancient Babylonian, Egyptian and Persian laws concerned themselves with female cleansing after childbirth. Probably, if ancient Israel did not address the issue of impurity at childbirth, she would have been out of sync with the ANE culture of her day. Even Hippocrates discusses purgation ceremonies in ancient Greece, which were performed after childbirth. Yet, why would God choose to continue the tradition by reproducing it in the culture he was creating in the new nation of Israel?
The idea that impurity denotes a sinful condition is totally wrong and can be thus seen in the New Testament’s record of Jesus’ birth in Luke 2. Mary fulfilled the days of her purification according to the Mosaic Law and was pronounced ceremonially clean at the end of her period. How could it have been a sinful act to bring the Savior of mankind into the world? Since God sent Jesus into the world, how could Mary have sinned by obeying and cooperating with God’s will?
Why, therefore, include this ceremony in the Mosaic Law, especially if God wanted Israel to be different from the surrounding nations? Moreover, what was it about Jesus’ birth that made Mary ceremonially unclean? One could hardly believe Jesus, God made flesh, was unclean or impure, so how could his birth make Mary unclean (cf. Leviticus 12:1-4)? I believe the answer lies in the realization of why Jesus came into the world in the first place. After mankind’s rebellion God changed the process of birth in some manner that reflected man’s rebellion (Genesis 3:16). A sacrifice was required, because the birth of any child brought about a descent from a woman’s creative prowess (including that of Mary). So, the woman becomes temporarily ceremonially impure, because she no longer possessed (in her immediate ability) God’s creative power to bring life into the world. At least for a short time, it had become impossible for such a woman to fulfill God’s command to “be fruitful and multiply and fill the earth” (cf. Genesis 1:28). 
Man’s rebellion against God is realized in the flow of blood from the woman after childbirth. The whole purification ceremony is charged with symbolism, pointing not only to the creation of life but also its destruction due to sin. While the woman does not sin by becoming a mother, the idea of sin and rebellion is borne out in the process of her bringing a newborn into the world and the flow of blood afterward, including the eventual renewal of her monthly cycle in which the loss of blood (Leviticus 17:11) points to the loss of life, i.e. death, the fruit of man’s rebellion. The days of a woman’s purification is forty for a male child probably to reflect the number of days rebellious Israel scouted out the Promised Land but rejected it (Numbers 13:25; 14:34).
While this may answer one’s question about the purification ceremony in general, it says nothing that would satisfy the question of why a woman is unclean twice as long for a female birth as she is for a male birth. How can we address this obvious disparity? Admittedly, the Bible is silent concerning a specific answer, but this does not mean we cannot find one in the text or through a sensible interpretation. Chana Weisberg theorizes that because of the woman’s unique power to participate in the act of creating life that this necessitates a longer period of purification. While this sounds logical within the sense of Scripture, I will suggest another reason, namely, that the purification ceremony brings the woman back into sync with God’s ideal, just as Chana Weisberg suggests. If the child is a female, the process is longer because the mother and child pass through the time of purification together and consecutively. The male, however, is brought into sync with God’s covenant through the ceremony of circumcision eight days after birth (cf. Genesis 17:10-14). Since the woman doesn’t go through this ceremony, she must wait the full amount of days.
What I find most interesting about this ceremony is that the rebellion of mankind has its place even in the birth of Jesus. Nevertheless, the blessing of peace from God comes, as promised by the angel (Luke 2:14), indicating that God is no longer at war with rebellious mankind. The Savior, Jesus, has come who would bring light to mankind and teach us the way of peace (Luke 1:79). The ceremony of purification looked forward to the cross, where God was in Christ reconciling the world to himself (2Corinthians 5:17-19). The rebellion in Adam’s race is undone in the new creation found in Christ.
 As I said HERE, this current theme about “making sense of the Old Testament God” is based upon the book: Is God a Moral Monster by Paul Copan. These are my thoughts about his book. He may or may not agree with the impression his book has made upon me, but I thoroughly enjoyed reading what Paul wrote and recommend his book to anyone who is looking for a good read concerning defending our faith.
 See “Why the difference in the laws of ritual purity between the birth of males and females?” by Chana Weisberg, editor of The Jewish Woman website.