It is not an absolute setting. The Mac has to learn your habits. And if your on battery, on power habits are erratic, it will tend to charge to 100% on the assumption you will be on battery and want the full charge.
There are alternatives, such as
https://apphousekitchen.com/
As to why 80% is better than 100%. If the Mac sits on power 24/7 and almost never uses it’s battery, there is a much higher chance it will suffer battery swelling, warping your case, and risking an internal component puncturing the battery causing a short circuit resulting in fire.
The swelling, not the fire, has happened a lot to the Macs where I work, before optimizing charging was provided. Including my company Mac.
If you mostly use your Mac on the battery, then you are exercising the battery, and it is less likely to have these issues.
However, companies that give employees laptops, have a large number that just use them as a desktop replacement, and keep the Mac powered 24/7. Those are the ones with the problem Batteries.