Battery SOC is not a precise measurement because it is hard to measure. It is an estimate made by the observing current flows and other characteristics. And these characteristics are effected by environmental factors, system load, etc Read
this article if you want some basic information. And then google "Coulomb Counting" to go deeper.
The bottom line is the SOC is an estimate, don't get hung up on the exact numbers.