You appear to be confusing the bonding (250-104) of the gas pipe with using it as a grounding electrode (250.52(B)(1). You can't use the undergroud gas piping as a grounding electrode because that could create a hazard for the gas company if there was a current flow and they took the pipe apart. It would also interfer with their cathodic protection of the underground metal gas piping. The gas companies install dielectric fittings between the undeground and interior piping systems. The interior gas piping must be bonded to prevent a shock hazard. If a gas appliance with an electrical connection would have a ground fault, or if an improperly installed cable would fault to the gas pipe, the bonding would prevent a shock hazard. Note that this bonding is also required by the Fuel Gas Code, not just the electrcial code.