(Replying to PARENT post)
"Neutral" third parties conduct salary/compensation surveys. Many companies (HR departments) participate in these surveys and disclose their information to the third party.
The third party then packages it up into an anonymized 'market compensation analysis' that companies can subscribe to/purchase.
So companies can get a good read on how much is enough for their market, without ever directly revealing their hand to anyone except for the neutral middleman that's washing all the data.
A lot of HRIS (HR Information System) companies and payroll companies also package up and sell aggregate analytics on compensation figures. And the companies using those vendors are pretty complicit about their employee data being used in this manner, because at the end of the day they're the same ones buying the end result and peeking at the aggregate data to ensure they don't offer any more or less than they have to for a role.
(Replying to PARENT post)