Russia supports Syria because they make money from arms, but more importantly that is their only sphere of influence the in the ME. Increasingly, Russia is finding that countries are not interested in their help. If China are supporting Assad then I would guess it is for similar reasons as Russia.
This the BBBC's take on Russia/Syria
Foreign policy analysts usually tend to explain Moscow's inflexible stance on Syria by evoking arms sales to Damascus (Bashar al-Assad's regime is said to have placed orders for Russian hardware to the tune of $3.5bn) and the Russian naval station in the Syrian port of Tartous.
But this alone does not account for Russia's seeming indifference to the adverse effect that its international advocacy of the Assad government has on its relations with the United States, the European Union and the majority of the Arab states.
The explanation has a lot to do with Russia's domestic policies and the obsessions of the Russian political class.
By standing up for Damascus, the Kremlin is telling the world that neither the UN, nor any other body or group of countries has the right to decide who should or should not govern a sovereign state.
If one looks at the Syrian crisis from this angle, many of Moscow's previously inexplicable actions take on a new, clearer meaning.
Ever since the fall of Slobodan Milosevic in 2000, but especially after the 2004 "Orange Revolution" in Ukraine, the Russian leadership has been obsessed with the idea of America and the EU engineering the overthrow of governments that, for whatever reason, they find unsuitable.
President Vladimir Putin and his team seem to be convinced that something like that could happen to Russia.
Russia's political class never accepted concepts like "responsibility to protect", which aim to limit the ability of authoritarian governments to repress their own people.
Sovereignty, to the Russian leadership, means an unlimited licence for governments to do as they please within their national borders.
There is more here.
http://www.bbc.co.uk/news/world-europe-18462813