Did you realize that China is still in a state of civil war with Taiwan?
The two had a civil war after WW2. The Taiwan side lost the mainland, and fled to Taiwan.
Normally, when you lose a civil war, you don't create a new government. Otherwise, when the United States had their own civil war, then the southern states would have created the Confederate States of America, and slavery would still be alive and legal today.
Do you agree with this premise?
Taiwan is very strategically important to China. But, the United States is now using Taiwan to contain China. And they are using all the excuses like democracy and all that, but it's easy to see through the propaganda. Otherwise, why isn't Saudi Arabia a democracy by now?
If you think through all the angles, then you might actually realize the insane rationality behind China's motives.
That said, the United States is not China's enemy. But with the way geopolitics plays out, the United States is now firmly committed to securing Taiwan. Thus, both nations are now going to head into conflict.
The thing is, any military conflict between the United States and China, will turn nuclear. Once those missiles start flying, then sell your stocks, because the world is going to burn down. This is a pretty grim analysis, so I hope it never happens.
Even if you don't want to strike first, there is still a great advantage to being able to do it better. Especially if your adversary knows about your capabilities but not your intentions. See for example north-Korea wanting nuclear weapons. Something similar might have played a role for Pakistan. Being a nuclear power gets you seats at certain tables. Being a more dangerous nuclear power gets you a better seat.
This strategy has the weak point of enticing preventative measures, but it is a strategy at least.
Even 50 is a serious threat to China. If the US and China suddenly spiral into major direct war, China is vulnerable to a US first strike. A first strike against their ICBMs (but not cities) that is 50% successful would leave China with a fairly small second strike capability. Leaving China with the choice of trying to nuke the biggest 30 cities in America, knowing the US might shoot down half, or holding them in reserve. And if the try to nuke US cities the US would probably retaliate with 2,000 weapons.
EDIT: or the missile installations, I don't remember exactly.
I don't have a link for you, but I remember Putin saying this in the Stone interviews.