It's also the way prosecutors constantly charge people with other laws.

They can drag in a potato cannon, maybe light it with some black powder if compressed air doesn't "count", and show that the PVC pipe readily expelled the projectile and thus the pipe by itself is a "firearm barrel" if it can readily be placed into such a potato gun. It would be no problem to prosecute someone for selling the PVC pipe to a plumber and 100% meet the letter of the law.

I don't see that as farcical but rather a straightforward application of the law. Maybe you find the law farcical/cranky but my interpretation isn't.