Was it more inclusive, though? In practice, the number of shenshi from non-gentry origins who could pass the final rank of exams was pretty small - about as small as the number of non-nobles who could make it into a European medieval nobility. Furthermore, being ennobled because you had money or because you were a good soldier is just as 'meritocratic' as gaining access to bureaucratic positions based on your knowledge of the Chinese literary classics and your ability to compose eight-legged essays.Well, hold on there now. While you're right that it did take means to succeed in the civil service examinations, it's also true that it was more inclusive and more meritocratic than a straight-up hereditary aristocracy.
Now, I'm not defending the 'functional meritocracy' assertion but I was taught in my Chinese history classes that the ideal of a meritocracy served to legitimate imperial rule and also created a common cultural repertoire for those who went through the system (whether they passed or failed), both of which helped to hold the empire together.
I don't think that the ideal of a meritocracy legitimized imperial rule so much as the entire structure of Chinese government did. Emperor at the top, gentry working their way through the examination system to gain rank and position underneath, offering their counsel and assistance to keep the natural order of things together. When that system was changed in 1905 by ending the examination system, that legitimacy, which was already under severe pressure, eroded much faster. But the abolition of the examination system was designed to make government more meritocratic, by replacing knowledge of the classics with possession of technical, philosophical, or political degrees from Western-style institutions of higher learning.
The chance of social mobility was usually not associated with the maintenance of order in the old Chinese empire. Instead, social mobility was associated with the eras of imperial collapse, when bandits could make themselves kings and when the men on one of the lowest rungs of the societal ladder, the soldiers, were the arbiters of the future. When empires collapsed, the bare sticks came out to play.
I agree that the men who made it through the examination system were linked by a common cultural experience. I just don't think it means all that much when trying to figure out why China came together and stuck together as a political entity and other entities didn't. The men who became shenshi were always a tiny fraction of Chinese society. And sure, they read all the same books all in the same language, but so did European intellectuals from the medieval era straight on through early modernity.