Lithium-ion batteries don't like heat. They really don't like to get to true 0% (it's actually dangerous). They don't like being at 100%.
It is true that the phone's 0% is not a true 0%. There is a bit left because most electrode materials will deteriorate as the true zero is reached. This is why all lithium-ion batteries have a (simple) small IC to prevent total discharge and overcharging. These ICs are actually measuring a potential (in volts) and are simply stopping discharge (i.e. literally stops providing current) when a low threshold is reached. Charging is interrupted in exactly the same way when a high potential is reached.
Figure 3 in the following reference shows potential vs capacity level: https://www.ecochemie.nl/download/Applicationnotes/Autolab_Application_Note_BAT02.pdf
Capacity actually cannot be directly measured. What is set is current (Figure 1) for a given time, potential (Figure 2) is measured and capacity can be calculated from them (Figure 3).
Because capacity is not something one can measure absolutely but is something that is calculated, calibration is required to link a log of instantaneous potential and current to a "capacity". But that measurement is not infinitely precise and batteries age. Both these things make the calibration go off, which is why phones are constantly recalibrating (and there are battery "fixes" out there that involve recalibrating).
The way it actually recalibrates is by reaching those low and high potential thresholds in the IC.
Now, the example curves I have given are a bit outdated. I just wanted to make sure it was materials anyone could access. In modern Li-ion batteries, charging starts at low potential, it increases quickly to reach some sort of plateau then branches up to high potentials. The plateau is where you want to be to avoid degradation and is usually centered around the phones "20-80%" or "30-70%" charge. This is where the recommendation of staying at thode levels comes from. As explained before, if you really stop there and never reach "100%" to recalibrate those ranges will become off with time. This explains why "100%" needs to be reached periodically.
The last bit is the high cutoff. If there is a plateau that is nice and stable, surely one could just stop right above and then staying at "100%" most of the time should be fine and perfect. One problem is that the IC is a security mechanism. It it not smart. It stops charging at a predefined value that you don't want users to change (that would lead to exploding batteries, literally). And the second problem is that as the battery ages, the potential of that plateau increases so that means that potentially you would lose 80% of your capacity overnight if the threshold was set just above the original plateau value.
In general, manufacturers set the IC so that 15-35% of the useful capacity is provided outside the plateau.
This explains why people saying "in modern batteries, 100% is never reached so you can stay at 100% all the time without degrading the battery" is wrong. This is the reason why Googles' adaptive battery charges up to 80% and finished charging close to when you set your alarm clock: preventing the phone from staying out-of-plateau for 8 out of 10 hours.
Conversely, the IC threashold and ageing increasing the plateaus' potential is the main reason why you might have owned a device in the past that was fine and "overnight" cannot get over 15% of the lifetime it used to have on batteries.