Not rebelling against the heavily armed PLA is a pretty low bar for legitimacy.
You've probably been fed propaganda that legitimacy comes from democracy, but it does not. Democracy has long been seen as the least worst of any system for Americans. It is only as legitimate as those of use who fight to defend it, because freedom isn't free, and neither is our system: democracy.
Ultimately legitimacy comes from whether people fight for their government and defend their way of life, regardless of however wrong you may think it is. What is the legitimate government of Vietnam, Afghanistan? Clearly the the US-backed democratic government in Afghanistan is now going the way of illegitimacy (because no one cares enough to support it), despite being fully democratic. It's illegitimate because neither the US aid, weaponry, training, was able to get its democratic supporters to care enough to fight for their way of life. If people had to fight for what government they wanted (democracy, dictatorship, monarchy, oligarchy), and a foreign nation comes in and props one of these up with advanced weaponry and military force, and still fails, is it still legitimate just because it was a Democratic government?