Distinction between (default UB) uniform locations and uniform indices
Why is there additional notion of uniform locations and why does the API not use the uniform index of the uniforms
in the default UB to address them - which would then be consistent for both the named UBs' Us and the default UB's
Because 3D Labs wanted it that way.
I would suspect that their logic was that uniform locations could be byte offsets into internal structures or memory address or some such. That is, the location could be some data which is related to the location of the uniform's data.
The index is just an identifier for a particular uniform.
At this point, it's clear that 3D Labs's reasoning was simply not practical. Otherwise, it wouldn't be possible to have this specification. But that was the original idea. So now we're stuck with this two identifier system: one for setting the data and one for querying info about it.