Market reforms helped. But those reforms could not have happened unless the state did sensible things
Those same market reforms impoverished the entire middle class in New Zealand, where the state did not do sensible things (the reverse)
Markets are good at fully allocating resources, which feudalism and central planning is not. But they also concentrate wealth into the hands of very few (that is what wrecked New Zealand's middle class) and it takes deliberate government policy to avert that.