When did Iran become their ally?
It's not China's responsibility to save a country especially when that country doesn't value what China is offers them.
The Chinese drafted a massive $400 billion 25-year economic cooperation agreement, and the Iranians dragged their feet hoping they will get better deals from the EU under JCPOA or some other version of JCPOA.
So, China did not progress any further. (If Iranians are going to be so fussy, why bother).
On the other hand,
- In 2014, China offered a $400 billion economic deal to Russia, and the Russians grabbed it with both hands.
- In 2015, China offered a $62 billion CPEC package to Pakistan, and the Pakistanis grabbed it with both hands.
Russian has been pummeling Ukraine since 2022 with Chinese support.
Pakistan pummelled India in 2025 and now Afghanistan with Chinese support.
You have to commit to China. That's how it works.