Where did China get the money to do all of that? They're the poster child of benefiting from globalization and free-trade.
Governments investing on critical infrastructure, and basic services that give a foundation of opportunity is a precondition to growth led by industrialization/trade.
This thread is about how the governments can use their money and power to uplift the underprivileged, and not about mechanisms for the government to make money. It is a conversation on leaving the poor to "market forces" vs. governments ensuring basics to the impoverished.