But nowadays? why would you have a child? for a middle class+ family in a developed country, having a child is a 6 figures expense over their lifetime, limits your career, holidays, etc. From a selfish point of view, it doesn't make a lot of sense.
I don't think it's the only explanation but children are, individually, optional so you can, for selfish reasons, do it or not.