You underestimate both China's production capability and their desire to destabilize the south Asian region, so they can step in to take control. They have been arming Pakistan to the teeth against India. They even sold them the nuclear weapons tech. They don't care.
Both the US and China sold nuclear power technology to Pakistan, as I recall France also agreed to sell nuclear power tech to Pakistan .. in a deal that fell through because of something (haven't checked history) in France's domestic politics scene(?).
All three countries have denied providing nuclear weapons tech to Pakistan - there is credible history to account for both Pakistan and India to have independantly developed enrichment programs and weapons on their own*.
All things are possible, a plausible explanation for the flurry of accusations against China from 2000 onwards from both the US State Dept. and India was the bald fact that the US, the premier global atomic watchdog, was caught absolutely pants down and blindsided by the events of 1998** ... India detonated a series of nuclear weapons tests and Pakistan responded within 30 days with a slightly longer series ( 5 blasts Vs six in response .. IIRC )
* https://en.wikipedia.org/wiki/Pakistan_and_weapons_of_mass_d...
** https://en.wikipedia.org/wiki/Pokhran-II https://en.wikipedia.org/wiki/Chagai-I
U.S. Intelligence and India’s Nuclear Tests: Lessons Learned - https://www.everycrsreport.com/reports/98-672.html