Its natural human behavior, that the wealthy middle class people have only few children and invest in their education, while the poor have lots of children, in the hope two of them survive long enough to feed their parents, once they retire.
The only solution to this problem is fighting poverty, and educating women.