In poorer countries, the investment into each child is minimal. By the time they were 8 or 9 years old they were expected to contribute to the family. Higher child mortality rates also plays into this, as most families lose a few kids to disease etc. Children are seen as a commodity that they control to make the parents/grandparents lives better.
In industrialized societies the amount of resources dedicated to each child is more than the the resources dedicated to 5 or 6 families in poorer countries. Children are dependent on their parents well into adulthood. As the cost to raise the kids increase the average family size decreases because of limited resources.