It seems to be an accepted thing these days that people will always look for loopholes in laws. A law will get created, people will find loopholes to get around it to their own advantage, then the law will be updated to close the loophole (sometimes), and the cycle begins again.
People often consider themselves clever for finding loopholes, and treat it like a reasonable pursuit. Some people even go so far as to say that it's the job of lawyers to find loopholes, and that it's completely reasonable to expect this as normal behavior by both companies and individuals.
We all end up doing it because everyone else does it, and if you know people around you are exploiting a loophole to get ahead and you don't, you feel like a sucker. And no one likes to feel like a sucker.
This is one of the things that has made Greece, for example, have so much trouble recovering from the global financial crisis. Tax avoidance is such a social norm there, that now they need the money they're having a terrible time trying to actually get people to pay.
The end result of all of this is that our laws get more and more complicated as they need to handle more and more special cases to close loopholes. Or the loopholes are left, and the social wisdom gradually shifts to everyone doing it, and it becomes the norm.
The funny thing is, I think that in the vast majority of cases, people know that this is a loophole. They know full well that they are circumventing the intention of the law. In other words, they are fully aware that they're violating the spirit of the law, while complying with the letter of the law.
Spirit of the Law
So the question is this: what would happen if we made the spirit of the law the legally binding definition rather than the letter of the law? What would happen if a judge could effectively say, "Look, you knew damn well that this thing you did isn't what the law intended, and you just exploited a loophole to do something you knew you shouldn't. Tough shit, you broke the law."
The plus side to this would of course be that laws could become much simpler, and we would no longer have a legal arms race that rewards people who spend time trying to find ways to violate laws while technically obeying them.
My favorite example of this is how Goldman Sachs fucked over the aluminium commodities market by exploiting a loophole to their own advantage, and absolutely no one else's. Basically, they bought up a bunch of aluminium to affect the trading price, but regulations required a certain amount of this aluminium to be shipped every day (I forget the precise wording). So to comply with this, they would load it on trucks and move it each day from one depot they owned to another one they owned, keeping it stockpiled while still technically moving it. This made them obey the letter of the law, while obviously violating its intent completely, and costing consumers billions of dollars as a result (you can read more about it here).
In this case, doesn't it seem reasonable for a judge to be able to just say, "Fuck you, Goldman Sachs, you clearly violated the spirit of the law here, any reasonable person can see that. That means you broke the law. End of story."
The big problem here is then, how do you define what a reasonable person thinks, and can you really base laws off that?
A Reasonable Person
The answer turns out to be that, yes, you absolutely can base laws on what a reasonable person thinks, and we do it every day. It is a common feature of criminal negligence cases to use what a reasonable person would think is negligent in order to decide if a person is guilty. I don't know the definite history of this, but I'm betting it came about because in practice it's pretty much impossible to list every possible scenario and say whether it constitutes negligent behavior, so they chose this practical shortcut instead.
Regardless of the reason, it demonstrates that the concept is clearly legally feasible, so to base more laws on it might not be so crazy. At the least you could have the law state that if a reasonable person would think something violates the spirit of the law, then it does, but if it's too subtle for a reasonable person to be able to confidently decide either way, then you have one of the cases where you maybe can just follow the letter of the law or have some other process to figure it out.
It's interesting to note that the legal system generally argues that ignorance of the law is not an acceptable excuse for violating it, which means that the more complicated laws get, the less confident anyone can be that they're not inadvertently breaking the law in some way. This disproportionately affects individuals who are not rich, and also small businesses, because rich people and large companies can generally afford legal counsel to figure this out for them. The average person typically does not have the time or money for this except in exceptional circumstances. They also have less ability to scour all the laws looking for loopholes to exploit.
So the current situation disproportionately benefits rich people and big companies. If the spirit of the law became the norm, it would almost certainly level the playing field. Sure, the little guy probably can't get away with bullshitting on his tax return, but this is small fry compared to companies like Apple and Google doing things like exploiting the Double Irish tax loophole to avoid paying billions in taxes every year.
And, honestly, a world where everyone stops trying to game the system and pat themselves on the back because they think they're so fucking clever for violating the law in a technically legal way, wouldn't that kind of be a nice place to live?