There is a dude who has a substack called "noahpinion" who does really good writing on china and I was reading his article on Xi's Zero covid policies and it pretty much answers this question. Gives a great breakdown.
Plus: M&A among the chaos agents, and the end of the Cool Japan program
open.substack.com
Tldr: The Chinese government has a lot of internal propaganda during the peak of covid big upping their draconian measures and their effectiveness. This put them in a bind because they used it as a source of internal national pride as far as showing their superiority over the United State and the rest of the world. But, the dynamics have changed and everytime they lighten up restrictions, their numbers shoot up. So, they lock down again because if covid runs rampant it shows that China isn't so great in this regard like they propagandized to their citizens.
Also, like another poster said, their effective vaccination rates aren't great and they have a large vulnerable elderly population who if covid runs rampant, it will kill a lot of and that doesn't look good for the government. They are stuck between a rock and hard place. Either admit the L that their containment strategy isn't as great as they said or continue swinging back and forth between draconian lock downs and loosening lockdowns which kills their economy and pisses people off.