When, in a Data Frame Properties General tab, you check the box "Allow assignement of unique numeric IDs for map service publishing", the software could assign unique numbers to any layer that doesn't already have one, rather than assigning a -1 to everything. It requires a lot of manual tedium to go in and assign those numbers to every layer and group sublayer. This is even more cumbersom when annotation layers are involved, and ArcMap treats every annotation value as its own layer!!
Since these numbers now don't have to change in the REST endpoint whenever the layer order is changed, or a new layer inserted, who cares what the numbers actually are, so long as they are unique. (Think object.id's for feature classes.)