Think of it like your car battery. When you unplug the battery, your radio loses all of its presets and the clock resets. Orginally, the CMOS battery held a similar function, maintaining the memory that held the BIOS settings and keeping the Real-Time clock running when AC power was unavailable.
However, with modern computers the CMOS battery plays a lesser role as most BIOS firmware is smart enough to automatically detect the correct settings and those settings are stored such that they don't need power to persist. The CMOS battery is still required to maintain the RTC.
More information is available in Nonvolatile BIOS memory.