It should be noted that this kind of self-criticism was not invented in China. In the USSR it worked the same way. The CPSU chater required the members to develop "criticism and self-criticism". The CPSU program said that self-criticism allows the nations of the USSR to spot problems and hardships and to find the best ways for Communist development.
Self-criticism was necessary in one-party states because it allowed for criticism without questioning the ideology. Without admitting mistakes the power would become highly inflexible. Admitting own mistakes also allows an authority to retain the position while changing the course and without looking random and unprincipled. If there are no mistakes, but there are hurdles it means all errors are in the ideology.
Self-criticism is an art in itself for a careerist. One had do be cautious which mistakes to admit. Those should be minor or even confirm the views of the admitter (such as admitting not enough zeal in implementing his own views).
Self-criticism of a superior allowed the subordinates to more freely explain their concerns and criticise themselves.
Self-criticism is also instrumental in preventing inter-ethnic and inter-national conflicts. Suppose there are two peoples, say Armenians and Azeri who each claim that they are the right in any disputed questions. By requiring the both sides to self-criticize the central authority can shape the border line better for reconciliation: each side can admit mistakes in the weakest parts of their positions while keeping the most strong and important points.
Self-criticism can be used as an educational tool: in Vietnam army the soldiers were required to admit their mistakes at comrades meetings and this allowed to discuss what they should do better instead of what they did actually, how to behave next time and allowed to share the knowledge about mistakes so that the others also knew how to behave in such situation.
Sometimes criticism of the others can be presented in a form of "self-criticism", either by proposing for the collective to self-criticize themselves for something for which one person was known to be responsible (thus making hint at who was the guilty without pointing directly) or criticizing oneself for "not recognizing in time the mistakes made of the colleague".
A mistake confessed as a self-criticism usually was accepted milder that a mistake discovered by a chance or that lead to a disaster.
This principle is possibly rooted in the idea of "democratic centralism" and may be somewhat borrowed from a Christian concepts of confession and repentance but done not secretly but at public so that the mistakes could be discussed in collective..