Is it yours though? The employer could probably argue that it's theirs. Devil's advocate: I think it's widely understood that entities can be transparent with their data if they choose, other than NDA scenarios.
In the private sector, your comp is determined by a negotiation undermined by an asymmetric information disparity. HR at a hiring company has way more information around market comp as it is without having your exact current comp when they make an offer.
What I find particularly egregious about this is that management at this company had admonished me that my comp was 'confidential' and that I shouldn't discuss it, while simultaneously selling it to equifax.
Most of these jobs are not special or meaningfully "public". They're just normal jobs for firms that happen to be public bodies. I don't think it's at all obvious that people are knowingly and deliberately making these tradeoffs by working there.