Most people have an innate sense of fairness. If two people are doing the same thing, and one is getting compensated more for it, unless that person is deliberately kept ignorant of this fact, they are likely to feel that it is unfair.
Even if they were happy with the amount they were making before, that unfairness is likely to make them feel unhappy: not just because they could be making more, but because this says "we value this other person more than we value you, for reasons we're unlikely to ever tell you."
If, instead, this whole scenario started out with full pay transparency, it is vastly less likely that the company would be willing to allow this level of disparity in the first place, thus avoiding any party feeling unhappy.