Well that just goes to show that black and white thinking is sub-optimal. Telling people something that causes harm without causing a balancing greater or equal benefit is reprehensible, whether that thing is true or not.
Often, honesty is the best policy.
But not always.
Sometimes telling the truth causes more harm than saying nothing; and in those cases, saying nothing is the ethical thing to do.
In this particular case, the politician was harmed by having the truth about him made known. But, he was harmed temporarily, and going forward he will be the better off for it.
(I was accidentally outed to a family member, and I was
mortified, and at the time if I could have chosen for it not to happen, I would have. But I'm better off for it now, I think).
But how are you making the calculation of the offsetting gain? Do you believe it to be nothing? Do you think the public do not benefit from knowing more about their elected representative, and from being disabused of falsehoods?