Why would companies wish it weren't? It lets them underpay people because "the market" broadly underpays them.
I've talked about this dynamic with leaders like that, who opposed salary transparency because they underpaid people who they knew the market would undervalue, where the actual contribution of the person in question is irrelevant. As they put it (grossly), if you're a minority that would be paid less elsewhere, I'm going to pay you less here because I can. Not because you're a minority, but just because that's the way the market works.
I've been in situations where the "market forces" are stupid enough that I've been paid more than someone nominally one level up from me (senior eng. vs junior). It's immoral as hell but what are you going to do? The company is always going to pay every worker as little as they can, and not a cent more.
Edit: see also the recent stories about home values varying wildly based on whether the current owner is white or black. This is based on perceived 'market value', is this fair? https://www.cbsnews.com/news/freddie-mac-home-appraisal-hous...
However, having evidence that that is the reason such that we can be confident it is that, rather than assuming it, is difficult.
You might say that it amounts to the same thing, but attributing the problem to the correct cause is important.
It's important because it means that if the correct cause is bias, it's actually bias in every potential employer somehow, but how do you know? How do you know it's not something with the applicant or the application?
Saying it's just a biased market means you don't even think of other things it could be, such as a badly presented CV or a missing key skill, or a difficult interviewing manner. Those are more likely to have every future employer reject you than something insidious. It's unlikely that every potential employer has such a large pool of candidates that bias is the thing that means you don't get a decent enough offer to even beat your current salary.
But if it is a cabal of horrible biased people, then that's illegal and should be challenged as such. It's horribly unfair, but that's probably the best course.
Is it illegal? No. Immoral? I'd argue yes, if the only reason you get to pay them less is that the broader market is biased against them for reasons outside of their control.
The first is best done by peers & management anonymously, the second by a fairly objective public rubric and the last is purely market driven (no matter how much companies wish it weren’t).
Collecting all the information the same way and using the data collected cross purpose leads to all of them being done poorly.