Why are they buying ammunition only now? I think the reason is that other countries might not sell to them during a conflict for upsetting China. Basically they need to stock up before the conflict happens. If they bought them earlier they may not have enough facilities to inventory them.
In addition, ammunition, especially advanced ‘smart’ munitions, have a finite, and often surprisingly short storage life. Meaning even if you kept it all in perfect storage conditions the whole time, those munitions would still become worthless (actually, worse than worthless, as it is quite expensive, and sometimes dangerous, to safely dispose of expired munitions).
This is especially a problem with imported munitions, because they are expensive, and also because you don’t have the domestic manufacturing base to send them for life extensions or to safely dispose of them short of explosive demolition.
India’s reliance on imported arms is a chief reason why their munitions levels are at such critically short levels that their own GAO concluded they only had stocks for a few weeks of actual combat under ideal conditions (ie None of their ammo dumps or supply conveys gets taken out by enemy action before their munition stores are used or transferred to frontline units).
The alternative is to maintain wartime munitions levels with imports and pay eye watering sums of money each year just to replenish expired munitions. That would be unsustainable even for the US and China, which is why no serious military power relies on imported munitions. At most they have some imported specialist weapons for specialist roles and/or first days of war missions. But those would always be to supplement domestic versions rather than being the only source of such weapons.