One Hundred and fifty years ago, we were an agrarian society. No government programs existed. Instead, we had large families. With no birth control pills or condoms, and high infant mortality, it was not unusual for a wife to give birth to 10 or 12 children.
The children were expected to work, beginning at an early age, until they left to start their own families. Instead of 401k, parents invested in children. When the parents were too old to care for themselves ( typically in their 50s), the children were expected to support them financially.
That’s the way it still works in much of the world.
As government programs were put in place for the elderly, and wage paying jobs replaced family farms, the average number of children dropped dramatically. In fact, there are so few children, developed countries would all see declining populations if not for migration from developing countries.
I’m not convinced that this reliance on government provided retirement is 100% positive. There is something to be said for self reliance.

