Google is a company that wants to have access to all the information in the world. But if somebody rightfully publishes some information that is sensitive to Google, look what happens...
In fact if getting info is getting money/an advantage/..., then wanting all of it while not wanting others to have it, and not liking yours being given away, makes total sense.
Not taking side for or against Google here (and if I did, I would be all for salaries being publicly accessible), but you can't blame them or accuse them of being hypocrite when they do what they believe makes sense for them.