EPROMs store data by trapping tiny charges in intrinsic (insulating)
silicon.
The reliability with which they maintain those charges is dependent
on 1) the degree to which they were programmed (the amount of
trapped charge), 2) the rate of leakage of the charge.
The rate of leakage is dependent primarily on 1) the purity of the
silicon, 2) the absolute temperature, and 3) the incident flux of
ionizing radiation (usually UV, but x-rays and gamma rays will
do nicely to erase an EPROM).
So there are several factors that affect the rate of an EPROM
"losing its mind". The good news that a high-quality EPROM,
shielded from light and kept reasonably cool, can be expected
to maintain its programming for decades.
Of course, not all EPROMs meet those conditions. ;-(