What happens is that your spreadsheet won't be properly adjusted for all factors, people will look for bias, claim discrimination, and get a big bully to fine your company (and look caring and compassionate while doing it)
If most companies were transparent, employees would be a lot more knowledgeable about what leads to more pay. I think we would see more negotiation and engagement and healthier conversations about money. People would be upset at first, but once we start collectively understanding the legitimate reasons for pay discrepancies, and we eliminate the illegitimate ones, I think most people would be happier.
There are always exceptions, but they are just that: exceptions. The existence of an exception or outlier does not disprove what generally holds true for everyone else.