I would guess:
- Neither Russia or China can kick off about totalitarian regimes given their recent history. If they support the Syrian demonstrators they can't then clamp down on pro-democracy demonstrations on their own patch and they send the message to their own people that demonstrations work.
- While they may appear harsh to the Western mindset, totalitarian regimes in the Middle East can be a buffer to keep extremism in check - in particular Muslim extremism. Remove a strict regime and extremism could flourish. While I agree the UN should step in to prevent massacres, we have to be wise to what could follow.
- Russia and China have adopted a policy of non-interference with such regimes, giving them an advantage when it comes to trading rights. As such, both are heavily invested in such areas. Russia has large and ongoing arms deals in place with Syria.
- Of course there's also the general anti-USA/Israel factor, as well as the feeling that the 'Arab Spring' has been supported unilaterally by the West without care for the interests of Russia and China (and others).