There already is a sub-set of people whose salary is public: top executives of public companies (their compensation is listed in the public disclosures).
It had a very interesting effect: no one wants to be paid in the bottom 50%, so every job offer (at the executive level) claims to pay in the top 75% or so. Which led to salary inflation.
I'm very curious to see if the same would happen here (and I think it started to happen somewhat with sites such as level.fyi sharing salary info). If you see (in aggregate) what others get for similar positions, you are more likely to get an offer above that average. Which over time, leads to everyone getting raises.