During the Cold War, why were Mao Zedong and communism so popular in China?
There are at least two possible reasons for this.
One reason is a positive one. Mao and the communists were popular because they were able to create a country that was relatively powerful and which was free from foreign domination. Before WWII, China had been dominated by the Europeans, the US, and the Japanese. The communists helped to end this situation and made China into a country that was able to stand up to the US in the Korean War.
A second reason is less positive. The communists were "popular" in part because it was dangerous to dislike them. It is generally a much better choice to support a totalitarian regime than to try to rebel against it.