Diamond argues that hierarchical societies in all areas come about because of agriculture. He does say that agriculture and complex societies sort of help one another develop and so it is hard to determine what the causal relationship is. However, societies with intensive agriculture are essentially always hierarchical.
According to Diamond, agriculture makes it possible for a society to have a high population density. When many people live together in close proximity, there is a need for a strong government. If there is not a strong government, the people (who have no kinship or friendship relations with one another) will come into conflict all the time as the Fayu of New Guinea do.
With agriculture, then, comes the need for a strong central government. When there is such a government, society inevitably becomes hierarchical because those in the government or those near to them come to have much more power and wealth than those who are not.
In addition, hierarchy comes about because intensive agriculture frees up many people to do work other than food production. These people become merchants and artisans and even bankers. When this happens, hierarchy is much more possible because there is inequality of wealth.
In short then, China, like all other societies, became hierarchical because it had a dense, sedentary population made possible by farming.