The fact is that in addition to the battery itself, there is a special additional battery in the motherboard, popularly referred to as a "battery". In principle, she is and serves just for such purposes. If you remove the "battery" from the board and disconnect your PC or laptop from the mains, the time will be restored to default.
The motherboard has its own capacitor (formerly) or battery (now) that recharges when power is applied. And it is from him that the built-in clock is powered. Previously, these elements often failed and could be reset when the computer was turned off for the weekend.