Often because there is no way to get the gas to a power plant. There might not be a local power plant that uses natural gas, or there might not be pipelines, or the local plant might not need the gas.
Methane pops up in many places, and in order to use it for the power grid, you need it to pop up in a convenient place for the power grid.
The only other options left are to flare it, or vent it into the atmosphere. Methane is 40x worse for the environment in its uncombusted form than after burning it, so it's better to burn (flare) it. But sometimes the extractors don't bother. Bitcoin mining provides an incentive for entrepreneurs to seek out methane that isn't being burned, and burn it.