Why do we have so many loopholes in our legal system?
The major reason for this is that it is very difficult to write any law that will cover all contingencies. We are a nation that believes in the rule of law and we believe that it is important that people should only have to go by the exact letter of the law. In other words, we do not want people being convicted of crimes or otherwise getting in trouble unless the law clearly states that what they have done is is wrong. We would not want, for example, a law that said "you may not harm the environment in any way" because it would be very vague. There wouldn't be loopholes, but it would be very hard to know what was and was not illegal.
Therefore, our laws have to try to spell out exactly what is and is not legal. When laws have to do this, loopholes will inevitably arise. They will arise because people find that they can do something that violates the spirit of the law but that the people who wrote the law never envisioned happening.