(Answering only "How do they justify..."):
It is not uncommon for countries to say one thing and do another. The USA stood for freedom and democracy, yet sponsored some very nasty governments in Central America during the 80s. The fact that it was to fight Communism, an atrocious political system, does not excuse their behavior in that particular instance.
At some point, it just becomes a PR/marketing gig - you can ignore/rephrase/whataboutism things a fair bit before you run out of credibility.
Russia's activities in Ukraine seems to be hitting the limits of how much you can spin things, but China's "non-interference position" is not even close to the limits of what can be achieved.
Keep in mind also that most countries only marginally try to "convince" others of their position. They typically have 3 audiences:
supporters. Those won't see the problem as you see it and will support China anyways.
opponents. Those already don't like you.
in-betweeners. That's a much smaller group and likely not that influential in the case of China: countries have already picked sides in the above camps.
While this is a question about China, the same logic can be applied to the behavior of most countries you'd want to "call out".
And I am not sure China is supporting Russia all that much here, tacitly or not. Russia is a useful partner for them and they may even feel sympathy for them (after all their goals wrt Taiwan is much like Russia's wrt Ukraine). But, right now, Russia is a public perception disaster and China's abstention on the UN vote is an indication of how careful they are being about being lumped with Russia, in this instance.
p.s. Most of this answer relates to international relations. As to the internal audience, a country's population, China has it easier than most: it can just censor things that question its official position. And even with a free press, books like Manufacturing Consent give some useful tricks. You don't have to like Chomsky to recognize the authors are making some extremely valid points in it.