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.