I'd say the main factor was the difference in economic policy. China experienced transitioned from a socialist economy to a more capitalist one far earlier in its development, which made it less "painful". These changes were initialized from the bottom up, gradually, with effective policies starting at a local level and then being implemented on a wider scale. Besides being a huge source of cheap labor, China also enacted policy which made it more attractive to foreign investors, leading to its enormous economic growth and growth in living standards in the past four decades.
In the Soviet Union the perestroika, while well-intentioned, was poorly regulated and caused a massive free-for-all for any viable industries, leaving most people with nothing. While the Soviet Union had a more advanced economy than China at that point, it turned out that many of its industries, such as the collective agriculture (Kolkhoz) system, were considered to be uncompetitive in the international market and mostly abandoned. This caused an even huger shock because productivity drastically decreased, people lost their jobs, and the Soviet Union descended into a huge mess of political and economical instability that lasted for a decade after the fall of the USSR and still continues today.