Some oil fields also produce Helium. That's actually an element we don't have plenty of anyway. But most don't do that, the toxic black goop they're producing is almost all just a mess of Hydrogen + Carbon chains. Similarly "Natural gas" ie Methane is just CH4.
If we have plenty of energy anyway we can just make exactly what we need, no need to drill for a mix of pot luck hydrocarbons. If we don't have enough energy anyway then we're burning hydrocarbons to get energy and we might as well use them as a feedstock too.