Because you keep thinking about this from the legality perspective instead of the political or geopolitical perspective. If the US can successfully threaten Russia with 5500 nuclear warheads into an unconditional surrender. Do you think they won’t try that again on China with 500 nuclear warheads. “We called the Russians bluff. There is nothing to fear about the bluff from the paper mache dragon.” is going to be the China hawk thinking.
You don't fight with the 3000 air drop nukes collecting dust in warehouses, you fight firstly with planes, missiles and ships.
Even in nuclear war, US and Russia alike will nearly fully rely on their ~750-500 missiles on high alert, no different than how China would. Declaring how many nukes you have sitting as gravity bombs in warehouses without survivable launch platforms is not something that gives Russia or US any edge in geopolitical standing over China, it's just something they forced eachother to do artificially in treaties.
On the other hand, US and China's much stronger air, navy and conventional missile forces is something that gives them an edge in standing over Russia.
Russia will never go into surrender without first emptying all of their allies stockpiles anyways. At worst, they'll peace out with only the Donbass by threatening/using nukes. They already threw what everyone believed was an ICBM at Ukraine and there were no consequences.
The idea of washing your hand of nuclear consequence by giving nukes to a 2nd party is like a 5 year old trying to hide under the bed with his leg sticking out. It just means Taiwan getting destroyed before receiving a single one, and even if they do get their hand on one, using it just means America gets nuked in return.
There is a proper way to do this, the key is to not connect yourself to another's nuclear program, just look at North Korea and Iran, both are developing their own nukes and both China and Russia officially oppose them. Could North Korea really develop all the stuff themselves without external help, probably not, but the probability is not high enough start a nuclear exchange with Russia over.
Americans openly discussing giving nukes to Ukraine or Taiwan, without going through the pretense of self development, just goes to show the amount of mental capacity inside their decision making circles.
NK is really really good for that reason, they're a smurf account nobody can credibly tie back to China, like how US would wish Israel was.
Something China always insist on is that only China and US can have nukes in Asia. NK is the perfect enforcer of that, because they can first strike SK or Japan in the event they were close to creating a nuke and launch platform. Their reputation as a wildcard means they can get away without problem. Prior to nuclearizing NK, China had to always threaten mutual annihilation with US, leaving us with little options to control escalation options. NK fixes everything in that regard, and they're even going to take an active role in providing low end conventional security in the near future.