The key thing to look at is how padding may eventually be exhausted.
In order to preserve lexical ordering, build numbers are incremented
in a special way. Examples will perhaps illustrate more clearly.
What is happening here is that the left-most digit is incremented
early/preemptively. Whenever the left-most digit would change, the padding
of the id is expanded through a multiplication by 11.
This behaviour ensures that the following semantic is always preserved:
new_version > old_version. This will be true, regardless of padding
expansion. To illustrate the issue this solves, consider what would happen
if we did not expand the padding and instead just incremented numerically.
Here we eventually run into a build number where the lexical ordering is
not preserved, since "10000" > "9999" == False (because the string "1"
is lexically smaller than "9"). With large enough padding this may be a
non issue, but it's better to not have to think about it.
Just as an example of why lexical ordering is a nice property to have,
there are lots of software which read git tags, but which have no logic to
parse version strings. This software can nonetheless order the version tags
correctly using commonly used lexical ordering. At the most basic
level it can allow you to use the UNIX sort command, for example to parse
VCS tags.