Digging a hole to contain an "above ground" pool? There's a lesson in there.

The lesson, I believe, is that the more difficult a code is perceived to be (either to understand or to comply with), or the more expensive (and difficult) it is perceived to be to comply with it, the less the code will be respected. Along with that will be an increased perception of the AHJ as 'the enemy.'

Also, of course, the more creative and energetic will be the efforts made to get around code provisions.