Doesn't matter whether accounts care, that's irrelevant they likely wouldn't even know what he did claim as his salary in the first place. They don't exist in a bubble though, HR can check and if they do then it backfires massively.
Well generally you're still in work when you apply for jobs, of course any terms of a non-compete have a potentially bigger impact when you're still employed by a company as you're then subject to their disciplinary procedures etc.. and/or can potentially be sacked. Or, perhaps in this case, potentially sidelined and not offered any further pay rises etc..
Lets say Brian got a very large bonus, a specific figure - word gets out about Brian's bonus, his Bosses won't be too happy. Whether that is because Brian told his co-workers in the pub or because an unprofessional head hunter outside the company decided to gossip a bit doesn't matter too much, Brian's bonus figure got out regardless and now the company knows about it and they're not happy.
Whether certain terms of a non-compete can be enforced can be quite complicated, I suspect as others have pointed out that you can't have a blanket ban on revealing compensation - things like fighting discrimination or having to reveal income to get a mortgage etc.. very likely can't be banned by some contract.