It's not "tax dodging", it's "tax avoidance", since what they've done is not only legal, but it's the expected and allowed behavior under tax law adjudication in the USA.
You misunderstand how tax laws work to think that there is some "spirit of the law" that individuals or corporate entities should be attempting to follow. There are simply the rules that must be followed and some wiggle room in how those rules are interpreted.
A "spirit" implies that there is some sort of equality between parties and a mutual understanding of something not quite written down. That's not the way that a judge views tax law. If the IRS can't clearly show how rules have been broken, then the IRS has no claim. The government/IRS write the rules and they're expected to write rules in a watertight fashion, not some vague "spirit of the agreement" fashion. If the government or IRS fails to do so, it's not viewed as the tax avoider's problem.
At the end of the day, tax accountants and tax attorneys are trained and paid to ensure that you (or your company) don't pay a penny more of taxes than are explicitly required by the law and it would be unethical for them to do otherwise.