The answer to this question can be found in the Epilogue of Guns, Germs, and Steel. The basic answer has to do with competition. Because China was so connected and unified, it did not face any competition. This meant that anything that it rejected (like a new technology) would simply be lost to that entire region.
Diamond talks about China’s “treasure fleets” as an example of this phenomenon. He says (on p. 412 in the paperback edition) that China sent seven such fleets out exploring and spreading Chinese influence. But then, political power struggles within China put an end to the fleets.
Diamond contrasts this with what happened in Europe. He points out that Columbus tried to get many rulers to fund his explorations to the west. He kept trying ruler after ruler until finally he found rulers who would fund him.
Diamond says that this illustrates why the West came to become more powerful than China. Because there was just one government in China, it could do things like rejecting exploration and the exploration would end. In Europe, if one ruler rejected exploration, there were other rulers who would embrace it. This would allow Europe as a whole to move ahead. Meanwhile, China did not move ahead because it was unified and so it had no second chances to try something like exploration.
On p. 413, Diamond says that it was
…precisely because Europe was fragmented (that) Columbus succeeded on his fifth try in persuading one of Europe’s hundreds of princes to sponsor him.
Chinese who wanted to explore could not “shop around” like this and therefore Europe moved ahead while China did not.