Tribalism. That is the way I see it. Most of our common law is originally derived from customs-hardened-into-law through centuries. Customs which grew from and in small tribal communities, often warring with one another. Customs, which at one point were necessary for tribal survival. Customs which have transited into religion. It is not a coincidence that most extant religions have an elderly bearded man as the entity on top - because that is what it was, and is, in most villages.

The sad and honest truth of it is that while we have progressed enormously in technology and society is immeasurably larger than the lawmakers of a two millenia ago could imagine - our minds and our values are still stuck in the village. The social inertia of getting people to change their minds - to value female children as much as males - is immense. 

Every so often we hear of some horrific rape from the subcontinent. There is the expected outpouring of sympathy for the hapless victim, outrage and hand wringing and then.. nothing. Things are back to normal. Educated, well off Indians living in big cities both in India, as well as abroad go about their business. When they are expecting a child, they fervently wish for it to be a boy. And the cycle continues. Until people rewire their own heads and try to be a somewhat better human beings than their great grandfathers were - nothing will change.