Why does communism work in China?

Communism has never existed in the People's Republic of China.

The official economic model utilized in China is the "Socialist market economy" or "Socialism with Chinese characteristics", which is actually just a state capitalist economy based on state-owned enterprises and free-markets.

The government of China is run by the Communist Party, but that says nothing about the actual system over which the government presides over. Many high-ranking Communist party members are actually wealthy capitalists.