I see some engine oil cans have a “best before” or “expiry date” printed on them. Does engine oil deteriorate only over distance, or also over time?
Both. That is why recommended intervals for oil change are often expressed as several kilometres and/or several months. As a “fossil” fuel (made from crude oil that took millions of years to form), it seems surprising that a few months or even years should be a factor.
While the oil (even though altered by refining) might not change much or quickly over time, some of the additives that are put in it, which optimise its protection and performance in an engine, do. The same applies to the other fossil fuel components you might store - like petrol, kerosene and diesel.
By all means, keep a stock, but use it and renew it (rotate the stock...that has done no mileage at all!) at least annually. That limit is not an absolute “expiry”. But it is a “best before”.
Additives in oil are not (and do not need to be) preservatives. They are complex chemical compounds with a specific job to do (anti-varnish, anti-scuff, anti- sludge, anti-foam etc.) and some of them are a lot less steadfast than honey and salt. So, too, are the volatile “tops” of oil and fuel unless they are in absolutely full and hermetically sealed containers.
So, do check the expiry date on the can. And even if your mileage is exceptionally low, consider changing your oil more often than the mileage interval suggests.
At least “annually” (max) is the common guideline. And when you buy a used car, change the oil promptly (whatever the vendor says and whatever condition it seems to be in). Better safe than sorry.