When the Energy Independence and Security Act of 2007 was signed into law by then-President George W. Bush, it was well-intended: It would increase America’s oil independence and reduce dependence on foreign oil, it would produce cleaner air, and it would help farmers.

The Act required refiners to add ethanol to every gallon of gasoline they produced. If a refiner decided it couldn’t (too costly) or wouldn’t (internal decision) do so, it would be required to buy ethanol credits. Those credits, called RINs (for Renewable Identification Numbers), are now being traded and reaping hundreds of millions of dollars in gains for the big oil companies. According to the New York Times, the Act has “inadvertently become a multi-billion-dollar windfall for some of the world’s biggest oil companies.”

Specifically, Chevron, Royal Dutch Shell, and BP (British Petroleum) could reap more than $1 billion in profits just by selling those RINs on the open market. This is raising the cost of those refiners who must now buy those RINs in order to comply with the law administered by the EPA. Some may be forced to cut back production, lay off workers, or declare bankruptcy. Which will, of course, come back to cost the consumer, as noted by George Damiris, the CEO of HollyFrontier, a Midwestern refiner: “The consumer is paying more and it’s ending up in the pockets of retailers, major oil companies, or speculators. Over time, if this goes uncorrected, people will basically be put out of business.”

This is called the law of unintended consequences. In the oil business, those consequences either weren’t foreseen or were ignored. The Congressional Budget Office tried to summarize the good intentions of politicians exercising excessive hubris in thinking they could control the consequences through political action when they passed the Act in 2007:

Proponents of federal support for biofuels … offer several rationales for that support. First, biofuels may help the nation meet energy policy goals by increasing the domestic production of fuels for transportation and reducing the United States’ dependence on fossil fuels, such as oil. Second, biofuels may contribute to meeting environmental policy objectives, such as the reduction of greenhouse gas emissions. Third, federal support for biofuels can increase incomes in the agricultural sector.

That official “cover” for the Act was published in July 2010, a very long six years ago in the oil business. Fracking was just finding purchase, cars were getting smaller and more efficient, and farmers were happy to divert millions of acres from food production to ethanol production. And those RINs? They were selling for just pennies.

Today those RINs are selling for upwards of $.80 each, one of those unintended consequences that are forcing small refineries either to retrofit or go out of business. Those consequences are also taking sufficient acreage out of food production (to grow corn for ethanol) to impact the price of groceries. And they are proving once again the price of political intervention into what should be a free market.

Those originally opposed to the Act are now supporting it, thanks to having made the required investments to comply with it. For example, Jack Gerard, the top oil-industry lobbyist at the American Petroleum Institute, now supports the Act, telling the EPA not to change anything as any change would disrupt “compliance plans, investments and commercial agreements that were premised on the current structure.” Geoff Morrell, senior vice president of BP, likes the system the way it is: “Because a few other companies made different business decisions and are now living with the consequences is not a reason to suddenly change the rules.”

This is the perverse result of intervening in a complex system by politicians suffering from the hubristic belief that they can fully control the world around them. As free-market economist Milton Freedman famously stated, “One of the great mistakes is to judge policies and programs by their intentions rather than their results.”

Surprisingly, Exxon Mobil Corporation is the only one of the big oil producers that has the right idea: Don’t try to fix it; just repeal the entire program. For politicians, however, the temptation to “fix” a program they themselves installed may just be too much of a temptation. Which is another of those unintended consequences of government interference in places where it doesn’t belong.