A chunk of Sempra Energy’s natural gas pipeline sits in the dirt behind a community center in the village of Loma de Bacum in northwest Mexico. Guadalupe Flores thinks it would make a great barbecue pit.

“Cut it here, lift the top,’’ he says, pointing to the 30-inch diameter steel tube. “Perfect for a cook-out.”

The pipeline cost $400 million, part of a network that’s supposed to carry gas from Arizona more than 500 miles to Mexico’s Pacific...