Variation (chaos) comes from the tidal push/pull of all cumulative processes - all processes are nearly periodic (2nd law) and get slower - guaranteeing oscillator harmonics at intervals.
These intervals are astronomically convulted, but still promise a Fourier distribution of frequency: tidal effects ensure synchronization eventually, as all periods resonate eventually.
As systems are increasingly exposed to pendulums of positive and negative coherence, they will generalize for variance, and eventually for increasingly (fourier) selective filters of increasingly resiliente traits, that will generalize.
The system would eventually be increasingly resilient and eventually an awareness would develop.
Awareness of past periodic cycles would improve fitness (with or without consciousness) and eventually the mechanistic processes would be in the systems nature.
This is why we have pointless traditions, folk lore, collective unconscious artifacts, cyclical cataclysmic religions, the Fermi Paradox, the great filters...
Variation and selection are woven, but understanding how it all stems from gravity by means of nearly perioidic oscillators (spinning planets, tidal pools, celestial bodies) due to the conservation of angular momentum, due to the 3body problem.....that is what took a genius to reconcile
I am not sure how this is a necessary conclusion to the premises you provide.
As Briggs–Rauscher reactions can eventually lead to Belousov–Zhabotinsky reactions, the system can maintain homeostasis with its environment (and continuing to oscillate) by varying reactants in a loss minimizing fashion.
This loss minimizing would be done during scarcity to limp towards an abundance phase.
This is the mechanism that hypothetical tidal pools batteries would had exhibited to continue between periods of sunlight/darkness/acidity that eventually gets stratified as a resilency trait.
Basically a dice with a bajillion sides is getting rolled along an increasingly slim poker table, house winning eventually.
Time only goes one way, protons dont decay, energy is radiated unto the cosmic background hiss, until homogeneity is reached as CMB, and entrophy reaches 1.
I dont know where it comes from, but I know the shape it makes as it rolls by.