Section 81 of the Tax Administration Act (and its successor, section 18) existed for a specific purpose: to protect people's private information, and to protect the integrity of the tax system. Here, it has been used for another purpose: to cover IRD's political arse and prevent public criticism. It is a perfect example of how these clauses are abused, and why we need to repeal or significantly limit them (note that this is perfectly consistent with retaining criminal penalties for staff who abuse their positions and release such information without authorisation).
In this case, I would suggest repeal. The interests protected by the secrecy clause are already well-protected by the existing withholding grounds of the OIA (namely privacy, confidentiality / commercial sensitivity, the maintenance of the law, and potentially the rarely-used " substantial economic interests of New Zealand" clause). While many of those grounds are subject to a public interest test, the established public values around the privacy of people's tax information and the need for accurate disclosure would make that virtually insurmountable. As for the rest, if IRD thinks a particular disclosure would undermine the tax system, then they can argue that to the Ombudsman. Because it is clear from this example that they massively overestimate that risk and consistently conflate it with their own political interests and job security. And that is not something the law should enable.
Correction: The request was by Eric Crampton.