1) The letter of the law, the spirit of the law, the intent of the law are all open to interpretation.
2) The test is a measurable, repeatable exercise that determines if a part is legal.
3) The trouble is that not all tests can check all aspects of the law so if the engineer finds something that isn’t being tested, then it cannot be illegal and can therefore be exploited.
Once the team does something like the flexi-wing to exploit point 3 the law makers either change point 1, the law, or improve point 2, the test, and the engineers go off to find a new point3, the loophole.