It is about who the manufacturer was, what formula they used for the primer compound, what formula for the powder, how they handled the case while making the cartridge, and how it was stored divided by time.
About 5 years ago out of curiosity I dug out an old spur trigger .32 RF revolver (Patriot variant) and some old ammo for it my Grampa had left me and successfully fired off 5 rounds of Short (still have some) and the remaining 4 rounds of Long with no problems at all. When did anyone last load that stuff? This was Union metallic ammo with the old fulminate of mercury primers (you can tell because about a week after firing little globs of mercury will appear at the bottom of the case), so what am I saying, 1922?
Alternatively I had a cardboard box of .22 RF Winchester ammo in my pocket once which went into a river with me back in the 1970s when a canoe overturned. A year later I tried the ammo and about 60% misfires resulted. I think getting wet is what caused that.
On the other end of the spectrum in the mid 80s I fired two 20 round boxes of WRA 17 headstamped ammo someone gave me once through my .45 with only about 3 misfires.
OTH, in the same time frame lots of shooters learned the hard way that WD 40 and ammo should never be allowed to approach each other. Other newer oils sometimes are equally deadly to ammo if placed on a gun.
There is no hard and fast rule as all manufacturers try to cut costs and change formulations as supply sources change from time to time, so try to rotate everything every 4 or 5 years, but don't assume old ammo kept in good storage conditions is all duds.