It seems kind of odd to me that China would always fall to its nomadic neighbors, starting from the Tang Dynasty with An Lushan all the way to the Ming Dynasty with the Manchus. If China was so strong, why does it seem to always get murdered by some people from off in the middle of nowhere Siberia or Mongolia?
It's not that the Chinese got murdered from random people in the middle of nowhere.
It's that in most situations where there were "outsiders" who invaded, it was precipitated by rebellions, famines, or the breaking up of a central power in China. The Mongolian invasion for example was during a time where China was actually split up into multiple "Dynasties" ruled by different people. (Southern Song, the Jin, the Liao, and the Xi Xia) Likewise, the Qing Dynasty was a combination of the fragmenting of the Ming Dynasty suffering from a peasant rebellion and what would be the uniting of Manchuria under a warlord.
Although I'm abridging it, it's less that China "failed" to deal with "barbarian threats" and more that China as a region (not an entity, as not all Chinese Dynasties occupied the same area) would have power shifts and other powers (be it Mongols, the Manchus, or even Europe) would capitalize on the fluctating powers. Also it has to be noted that the idea of a homogenous China never really materialized given the sheer amount of land that comprises the region of China.
And remember that these "nomadic neighbors" were not politically and militarily inept entities themselves. The Mongols and the Manchus alike had governments and had unified themselves into a serious threat. Especially in the case of the Manchus which if I remember correctly actually was enough of a threat to supercede the rebellion that was going on in the Ming Dynasty at the time. (The capital had been taken by a peasant rebellion force already).
The Steppe Nomads were a force to be reckoned with in terms of military might. For Europeans these people were a distant threat. For China they were their next door neighbors. Sometimes the Chinese successfully interfered in the politics of these Steppe Nomadic tribes to keep them from growing too powerful the same way Roman's played their Barbarian neighbors against each other. Other times Steppe Nomadic tribes confederated, swooped in and conquered parts of China.
The difference is Steppe Nomadic Armies were far more dangerous than Gauls or Germanic tribes. The amount of times Europe had to confront Steppe Nomads was minuscule compared to the number of times the Chinese had to deal with them. I can't think of any European Kingdoms that had a favorable military record against Steppe Nomads.
Edit: Sorry spelling errors. Late night typing.
Can you elaborate on what you mean about China "failing" to deal with these threats in contrast to Europe?
Europe experienced serious problems with invasions of steppe people at least through Tamerlane.