The main reason is that many batteries actually start above their labeled design capacity. As the capacity will be reduced over time with usage there are some manufacturers that use larger batters to ensure an acceptable runtime after a few hundred cycles.
Also, our capacity is an estimate, with more charge cycles the estimates will improve (charging a larger % will also be more accurate than charging a lower %). For the most accurate estimate please do a manual benchmark instead: https://accubattery.zendesk.com/hc/en-us/articles/213575425-How-to-benchmark-your-battery-health
Lastly, there are many phones out there that just have good batteries. We have a Xperia Z that's over 3 years old, charged daily (most of the time to 100% instead of the recommended 80%) and it's still at 99% of its claimed capacity. We also have a Moto G 1st gen that's still at 97% after 1.5 years.