You only lose the statistical data stored in the battery if power is lost only if you use RAM type memory (stands for Random Access Memory), which holds only temporary data while there’s power. When power is lost, the data in the RAM is gone.
But I suspect that the data would not be stored in RAMs because there can be too many reasons for complete battery power loss (like perhaps a complete draw down, or removal of the battery for some reason), which would make the statistical data too volatile and prone to be lost. Most likely, they store the statistical data in some kind of EPROM (Erasable Programmable Read Only Memory), in which case the loss of battery power would not wipe out the data because it’s the ROM type (that can be erased and rewritten into).
I suspect the device would only know if there’s a new battery in use if the HCP uses Genie 2 to tell the HA that a new battery is being used, thereby resets the data and restarts the statistical accumulation of usage. That’s why if it’s not done, then things get messed up because the usage data continues to be collected, but no longer on the original old battery that gets replaced.