Sounds sensible but I don't think that's actually a law. If doing something via a business legally reduces your tax bill then it is, by definition, legal.
The parent commenter seemed to be saying that if you could reduce your tax burden by putting something through a business then that's illegal even if you've not broken any specific laws.