Companies (especially large ones) don't like it as it limits their negotiation position it can also disclose indirect discrimination e.g. "oops all the females seem to be under paid by 10/20%" which can get expensive.
And it also limits employees when they want to move as the new employer knows how much they make now.
Yes, I understand why companies do it. They don't want people to know when they are under/overpaid.
What I don't understand is why people don't talk about it. If you tell and you learn you are overpaid then you feel good. If you learn you are underpaid, well, time to go negotiate/look elsewhere.
Do people think they ARE their salary? It's simply money that some people arbitrary decided to pay you...
And it also limits employees when they want to move as the new employer knows how much they make now.