It is illegal to avoid telling the tax man anything you do not want him to know, but legal not to tell him information you do not mind him knowing.
Sounds weird but it's true. Sort of.
The actual law has had its wording twisted to make it seem funnier. The law actually requires a person to disclose schemes that are deliberately designed to avoid tax which would otherwise be due to HMRC.
Apparently it is an oversimplification of the Tax Avoidance Scheme Regs 2006, S.I. 2006 No 1543.