To be fair, in that particular instance they were only welding the back door. They left the front door alone so that people could go out (at their assigned days and times). They got rid of the back door to make it so that community enforcement of these restrictions was possible.
At the level the epidemic reached in some area of China that may have been necessary to slow the flood, no different than rationing during famine.
I have some issues with China (corruption, nepotism, pervasive tracking), but this is not really one of them.
China was welding doors shut to keep people from leaving their apartments.