it's strange that you are comparing democracy with a communism.
Wasn't the whole premise of democracy to express yourself freely and the core idea was "rule by the people"?
If country claims that they are democracy, then they should give people to add their opinion to rule the country, China is following its own core idea, ruled by a single party.
People have been detained/face deportation for activism against other foreign countries, so why not? The point is: if the admin wants you gone, or doesn't want to let you in, they'll use anything as pretense.