Ukrainian munitions get used up almost immediately. They don't need to stockpile, they are in a steady state wartime production.
On the contrary, peace time countries have to stockpile. A manufacturing line cannot be ramped up from zero to wartime, we need low volume manufacturing to retain the expertise and the supply lines. But that, in turn, means that we have to either trash the entire manufacturing output every few months (which would be insane), or stockpile. The latter option also requires building more capable systems so that the stockpiles are still relevant in a few years.