It strikes me that these sort of practices where employers share salary data with each other with the aim of keep salaries low is pretty sketchy and shady. A load of companies get together with the aim of making sure they don't pay a penny more than anyone else etc.
In finance salaries and bonuses are to rocketing to attract and keep talent, yet in tech all the companies get together and basically implicitly agree not to compete. It is a shame that this appears to be legal.
I guess we can vote with our feet/keyboards.
How would a union work here if the company just turn around and say "sorry - your members are already at the top of the rate in this market. Our policy is not to pay more than the market rate. End of discussion."? You could move to another company, but they also only pay market rate etc.