A maybe reasonable guess would be that they, too, expected this war to be over before any large response from the West could be mustered. Then the whole thing would be out of the news-cycle relatively quickly, and while Russia would still be hit with harsh sanctions, China would have a) a russian economy even more dependent on them and b) a blueprint for what to expect in the case of war with Taiwan.
China's stance since the invasion isn't really unique though; India, Brazil, Vietnam and quite a few others also chose to abstain from the UN motion to condemn the invasion and call for an immediate ceasefire. - In fact, countries "representing" more than half the global population abstained. These countries also try to balance their response, while being pressured to show solidarity with Ukraine by their population internally.