Is this the only reason one would want to withhold disclosing everyone's salary?
Full disclosure would likely lead to one salary for every person in that role. But anyone that's spent any time in a company knows that not everyone is the same. I would hope top performers get paid better than mediocre or below average employees. And if everyone had all the info, that would open up huge legal liability due to the perception of bias.
There would also be complaints and comparisons across roles as well. There's also the privacy component.
I think the idea of pay transparency but in practice if you dump everyone's salaries it would case a disturbance and a huge cultural shift in an org that didn't disclose salaries before.