I think you’ve answered your own question. Salaries are secret largely based on the stigma that employers have put around publicizing them, because it allows employers to act from a more advantaged position.
In academia, even while the salaries are rather meager, at least they are public and equal to everybody (depending only on your position and seniority, according to some public tables). We could very well do with a bit of wage inflation!
(IANAL)