Leviticus distinguishes between "sin offerings" and "guilt offerings". I don't think you can read "sin", here, in the ordinary sense.
I can see how, during a moment like a new child, that a token offering for "venial" sin woudl be made, along with a thanksgiving offering for the child. It makes perfect sense to me.
I don't think it means that the mother or family committed some sin necessarily.
It's a catch-22 of sorts. If Mary is without sin, then she doesn't need the sin offering. But if she does not make the sin offering, then she has broken the Law, a sin in itself.
SD