Batteries go flat because they lose their ability to store chemical energy. When a battery is connected to a circuit, chemical reactions take place inside the battery that convert the stored chemical energy into electrical energy. This electrical energy is then used to power the devices connected to the circuit.
Over time, the chemical reactions inside a battery will eventually use up all of the available chemical energy, and the battery will go flat. This process can be accelerated by a number of factors, such as high temperatures, high discharge rates, and short circuits.
So, while voltage is not used up in a circuit, it is the loss of chemical energy that causes batteries to go flat.