In order to understand how contamination on the contact surfaces of the batteries affects the voltage conditions, I made an equivalent circuit diagram.
Here, 3 volts of battery voltage supply the program back circuit, which is assumed to be a load (resistance) with 1 kiloohm.
100 ohms are added as the internal resistance of the batteries.
This leaves 2.73 volts in the voltage divider to supply the load, which should still be sufficient for stable operation.
The values are only assumed and are intended to illustrate the relationships.
An additional resistor, formed by the dirty contact surfaces of the batteries, is now added to the series circuit.
At 806 millivolts, it takes up a large part of the battery voltage.
Only 1.99 volts remain for the program back circuit (load), which is too little for stable operation. The battery warning appears and the time and date settings are reset.
Due to the unstable battery contact, the voltage conditions in the chain divider have changed again.
More current flows because the batteries contact has improved again, that means less resistance.
So there is now 2.65 volts of input voltage for the program back circuit, the time/date display starts again and remain stable until the next reset.
This is just an assumption and simplified.
But it helps to establish connections that provide guidance when electronic troubleshooting.
Interactive real-time circuit simulation and animated visualization inspired students and engineers to design 2.6 million circuits online and in mobile app.
everycircuit.com