Things might have changed, but back in the days they usually just flared off hydrogen sulfide because it was hard to deal with and not very profitable. You more or less had to force the oil companies to collect it.
So yes - often a byproduct of oil production, but if the oil companies had it their way, they'd burn it on the spot.