And yet you can hire a lawyer who can show you similar looking loopholes that are completely legal. Structuring to avoid taxes is illegal but the double Irish method isn't? There are many other such loopholes and telling the legal from the illegal appears mostly arbitrary.
I was always wondering why no one steals luggage at the airport. You can walk in and take stuff!
Ah, but how often is that law enforced? And is it easily enforced? This seems ever increasing in importance nowadays.
It's enforced so often that people who aren't even trying to circumvent the law get nailed: