Very simple to understand why. Because many of their children die in the first place.
Also because, traditionally, child labour is normal and they can help on the farm (where there is plenty of space). In times of relative plenty (i.e. not famine) children can be an economic net asset (rather than a liability) for a subsistence farmer or similar. Also, traditions, almost by definition, tend to last longer than the conditions that developed them, so biases in favour of larger families tend to last a generation or two.
In conditions, which apply to most of the West, where child labour is greatly restricted and most people live in urban or suburban areas (and so space is at a premium), children are a substantial economic burden, so many people who would like to have many children may not be able to realize their desire. I have read, too, that, correcting for culture, geography (i.e. city vs country) etc., rich people have more children than the poor, as the economic burden burdens less. So it seems, to me, that the major influence is urbanization, including indirectly via culture change, rather than economic improvements, per se.
Given this, it would be interesting to see comparisons between modern families in the country and the city (and the proportion childless in each) as well as statistics for the (much smaller) cities of a few hundred years ago (in Europe) vs the country.