Lithium Ion batteries do not give any outside indication of how much energy they are currently holding. That is to say, the voltage output does not change based on how full or empty they are.
Sooooo, the devices that try to tell you how much energy is left in a Lithium Ion battery "GUESS". They monitor the amount of current over time that is either put into the battery during charging, or the amount of current over time that is used from the battery to run the device. They then GUESS as to how much energy is left in the battery and give you some indication in the battery icon. But it is a GUESS.
When you are drawing a large amount of current, the software GUESSES that your going to run out of battery sooner, and will adjust the icon to show that. When you slow down your current usage, the time remaining until you run out of power will be extended, and again the icon is adjusted indicating you have more time.
And to make the software more complicated, the total amount of energy a battery can hold decreases over time. A heavely used battery may only hold a fraction of its original capactity after a year or 2 of use, depending on how hard it was used during that time. The software needs to factor that into its GUESSING caluclations as well.
But is all a huge GUESS on the part of the software because the Lithium Ion battery technology shows the same voltage until just before it is totally empty and then the voltage drops off a cliff and head to zero really fast.
Lithium Ion batteries hold the most power, for the least weight, at the best cost than any other battery technology, so they are widely used in portable devices. So you get a GUESS for the battery life.