it's a real cost, and a real benefit. I guess values vary on which is more important.
Overall the benefits for employees seems way broader than the benefits for the companies.
On a purely economic basis, wage transparency primarily benefits employers because it reduces how much they need to pay based on actual performance in practice.
Why would transparency reduce how much employers have to pay? Usually capitalists would make the opposite claim, by keeping salaries opaque, it's much easier for employers to underpay people, but you seemingly are making the opposite claim.
If I can see how much my employer pay others, doesn't that help me ensure I too get fairly compensated from the employer? How could the employer leverage this situation to pay me less than I already know I'm worth?
When wages are opaque, an employee only needs to justify their worth to the employer. Employers pay for value net of wages, so they are often happy to pay someone much more if the individual value generated justifies it. When wages are transparent, an employee needs to justify their worth to everyone else because a higher wage is tacitly reducing their wage. This creates social pressure separate from the economic argument.
Other employees are incentivized to maximize their own wages regardless if it maximizes value for the employer. And there are many more average employees than high performers. Employers can leverage this social pressure to cram down the wages of anyone who wants to be paid above average because they no longer have to defend a lower wage on a purely economic basis. Empirically, this is what happens.
Anecdotally, I've seen this play out countless times at companies.
Then your salary will be decided by lowest common denominator. Employer does not leverage this situation, employer reacts to the incentives this situation creating.
Why would it? That's not what happens in practice, and you have raw data to point at, with things like "Person A is half a fast as me, and earns X, that's why I deserve X+N", not sure why you think there would be another outcome here, and it's clear you've never experienced this sort of environment yourself.