I saw a very good article explaining this Children aren’t worth very much—that’s why we no longer make many.
I had heard this explanation before - children used be an economic benefit, and now they are an economic burden. But this goes a little deeper.
But the fertility decline is not merely the product of a price effect - of people having fewer children because children are more costly. Children are not normal goods...or even inferior goods...they become not goods at all, but rather bundles of claims on their parents. ..Before the fertility decline, resources flowed from children to parents; after the transformation, resources flowed from parents to children.
In each country, before the demographic transition, children were essentially the property of their parents. Their labor could be used for the parents' good, and they were accustomed to strict and austere treatment. Parents had claims not only to their children's labor in childhood, but even to their wealth in adulthood. To put it crudely, marrying a wife meant buying a slave factory, and children were valuable slaves.
After the transition, mediated by mass education, children were transubstantiated into persons. Their individual status increased, and parents no longer had a culturally recognized claim on their labor. Children's culturally supported entitlements increased, including not only food and clothing, but also study and play time. Their relationship with their parents became more egalitarian and friendly, their treatment less strict.
But children do not exactly own themselves in the present situation: the government has claims on their future earnings, through taxation and other mandatory payments (and, increasingly, education loans). In essence, mass education is a communist transformation: individually-owned "goods" (children) are brought under national ownership, and returns from children flow to the country as a whole (through tax-based entitlement programs), rather than individually to their previous "owners." When farms are communally owned, production suffers and famine results; when children are communally "owned," fertility decline results.
There is another, related shift in the direction of resource flow during this time: resources (including labor) stop flowing from wives to husbands, and instead flow from husbands to wives, as a result of Western-style female liberation. This trend is also a result of education, and amplifies the trend toward low fertility.
So why did people used to have children? It's hard for us even to imagine, but children used to be valuable - they used to be much more like slaves or farm animals, which are both very valuable. They were also treated much more like slaves, with patriarchs (at least) maintaining distance from children...