Carla, there are ways around most every rule. The question is, do we want to break them. Personally, if the question is do I want to take the chance on burning down the shed or hit the power line if I am spading up the garden, then I don't want to take the chance.
We all have to make this choice. Speeding is against the law too. I might have accidently gone 5 miles over the speed limit 10 years ago myself.
But I do know of a case where the building inspector made an acquaintence of mine pull up electric wire to his barn, which was more than twice the work and at a heavy cost. So it does happen that you get caught on something like this. In any case, if you have a good Building Inspector, he will help you with the design and you will be sure that you are safe. And, no, I am not a pro. I sell steel for a living.