In Islamic Third World environments, you have child marriages. In other places, like China, girls are simply aborted or killed in infancy. It comes down to poverty, and girls having little economic value in pre-industrial societies.
When the girl is married off young, the parents no longer have the expense of feeding and clothing her. Why not marry her off to a young man? Because young men are much less likely to have the wealth to support a wife.