I don't see how this is related to public salaries.
If the first company you mentioned doesn't make their salaries public, while the second one does, if this is even the case (can't really tell from your story), that sounds more like a coincidence than anything else.
I'd even expect a company that pays people exactly what they believe them to be worth to be less likely to make salaries public, because then seeing you are paid less than someone else would directly tell you you are valued less.
It is related to your personal anecdote, that you couldn't get a bigger salary because it would have surpassed the salaries of other employees of the same perceived value as you.
With my personal anecdote I was showing that this can also work in your favor, and under some reasonable assumptions this will increase the average salary and decrease the variance as you suggested. The only losers are good negotiators or persons with good pedigree, because they win at the expense of others.
BTW, the second company I mentioned doesn't actually have public salaries, just matched salaries for similar perceived value. So I still don't know what people above/below me or on different tracks make.
That is entirely true and I wrote so myself in my first comment in this thread. But this comment was about something completely unrelated (specifically, about public salaries potentially screwing over people who are able to negotiate a high salary)
If the first company you mentioned doesn't make their salaries public, while the second one does, if this is even the case (can't really tell from your story), that sounds more like a coincidence than anything else.
I'd even expect a company that pays people exactly what they believe them to be worth to be less likely to make salaries public, because then seeing you are paid less than someone else would directly tell you you are valued less.