I'm reading through Leviticus right now, and just got to chapter 12 where the laws discussing childbirth are mentioned. The fact that a woman was considered to be unclean twice as long if she had a daughter than if she had a son is bewildering to me. But then I read this:

6 “And when the days of her purifying are completed, whether for a son or for a daughter, she shall bring to the priest at the entrance of the tent of meeting a lamb a year old for a burnt offering, and a pigeon or a turtledove for a sin offering, 7 and he shall offer it before the Lord and make atonement for her. Then she shall be clean from the flow of her blood. This is the law for her who bears a child, either male or female.

Since children are declared to be a blessing from the Lord (Ps 127:3-5), can someone explain to me why a sin offering was required whenever a child was born?