The parent comment is about adjusting pay for productivity, what is the reasoning behind "in a world where you compensate for productivity, you'll have to pay more employees that are less productive"?
The main reason is that people are petty, lawsuits are a very risky roll of the dice, and bad PR can cost a lot more than a bad employee.
The other reason is that pay transparency is often anchored to specific credentials and characteristics, and it's often the case that credentials can be orthogonal to work performance. You might have a PhD who can't code who demands higher pay than a HS dropout who designed your entire infrastructure, and the HR department (or lawsuits, or etc) would force you to comply.
Equal pay for "equal work". Two people have the same job. One is 2x as productive as the other. But they would be paid the same, due to a drive for pay equality.
The other reason is that pay transparency is often anchored to specific credentials and characteristics, and it's often the case that credentials can be orthogonal to work performance. You might have a PhD who can't code who demands higher pay than a HS dropout who designed your entire infrastructure, and the HR department (or lawsuits, or etc) would force you to comply.