But many extremely high paying, high agency jobs do have public or public ish salaries. Biglaw as one example, and functionally big tech as well. I know the salary ranges for my level, and the level above and below me, at Facebook and Amazon and Google. There's some numbers and a formula based on your performance rating, and for like 95% of people, those numbers and that formula will be within 5% of your compensation. There's lots of agency, and a fair amount of variability within a level (25%), but how your performance impacts that outcome is fairly well understood.
I would definitely not characterize big tech as having "public salaries." Simply knowing someone's level is completely insufficient for knowing their compensation. When compensation within a level has $100k+ variability, it's definitely not public knowledge.
Yes, if you have their full and work performance history you can determine their salary. But most people are actually quite uncomfortable with sharing their performance publicly.
Fair, but ranges are functionally public (and when not public, they're still 90-95% algorithmic). I know what the upper end of what I can get paid without promotion is, and I know, generally speaking, what I need to do to get there.