How do (unused) electronic components age?
It's worth distinguishing between unused never-assembled components and unused assembled devices, and consumer versus military. 

Quite a lot of components specify an unassembled shelf life that's suprisingly short. This is mostly because water gets into the packaging, which will boil and explode during soldering. So you might have to carefully dessicate components before use. There's a lot of "new old stock" floating around in various inventories, some of it forgotten.

In assembled devices, batteries are going to be the first thing to go. Very few have shelf lives above 10 years. Some missiles have molten salt batteries as a way round this.

Electrolytic capacitors are next to go. People restoring old electronics will often replace all the electrolytic capacitors before even trying to power it on.

Beyond that, corrosion is the main enemy. If it's sealed against corrosion, it will last an astonishingly long time. Epoxy chip packages are slightly less durable than the ceramic ones.

There's a small cottage industry in recovering Nixie tubes from old electronics from the 1950-1970 period and reusing them for their decorative properties in clocks.