News stories recently reported that Gene Sperling, the head of President Obama's National Economic Council, pulled out all stops to arrange a deal between Sunoco Inc. and the Carlyle Group, a private equity firm, for Sunoco's Philadelphia-based oil refinery, the oldest and largest on the East Coast.

Although Sunoco has lost $1 billion on its refineries over the past three years, Carlyle agreed to take a two-thirds stake, for which it made a commitment to kick in $200 million in improvements, according to news accounts.

Had the refinery closed, gas shortages could have pushed up prices by an estimated 20 cents to 30 cents a gallon in the Northeast, and some 850 union jobs would have been lost in an important electoral swing state-decidedly not what the president wants people to be complaining about a few months before an election. And so the White House invested time and political capital to get the deal done, which, incidentally, required setting aside some Environmental Protection Agency (EPA) regulations.

News stories seemed to focus on the fact that the Obama White House was working closely with a private equity firm during the summer even as it blasted Republican presidential nominee Mitt Romney for ... working for a private equity firm.

But the bigger story is how heavy-handed government agencies-and you don't get much heavier-handed than the EPA-impose unworkable regulations and hammer companies when they don't comply, which kills jobs and stifles economic growth.

And yet the politicians who are responsible for expanding those agencies still need to get elected-or re-elected, as the case may be. So they occasionally come to the rescue of certain select companies or industries by providing tax breaks or funneling money-the White House worked with Pennsylvania Governor Tom Corbett, a Republican, to chip in $25 million-or by relaxing certain regulations.

Pulling together the bipartisan deal was beneficial for everyone involved: the companies, employees, consumers, the oil and gas industry, and the state.

And yet one has to wonder whether the Obama administration would have invested so much time and effort if the refinery had been in a red state rather than a swing-state.

For nearly four years the Obama administration has thrown up roadblocks to oil and gas expansion everywhere it could, while pouring billions of taxpayer dollars into subsidizing green energy efforts-like the $535 million Solyndra boondoggle.

In addition, the EPA has been riding roughshod over states that are heavily invested in refining. For example, the state of Texas submitted a flexible permitting plan in 2010 that allowed refining plants to operate under an emissions "umbrella," without specifying how much pollution came from which sources.

The EPA rejected that proposal, forcing some of the country's largest refineries to get their operating papers directly from the EPA. It is that kind of anti-petroleum industry squeezing we have seen time and time again from the Obama administration.

The good news is that the Fifth U.S. Circuit Court of Appeals smacked down the EPA in August, siding with Texas that the agency had exceeded its authority under the Clean Air Act. Thank goodness the courts can still stand in the way of government logrolling.

That heavy hand of regulation keeps industries from thriving, and in many cases even surviving. EPA-imposed hurdles for building new refineries are numerous and very expensive. Sunoco, for example, reportedly spent $1.3 billion complying with stricter EPA rules before it decided to sell or close its Philadelphia refinery and one other.

Once the White House promised a little regulatory flexibility, the deal was made. Other refineries would also like a little of that EPA flexibility, and they shouldn't be forced over an economic cliff before they get it.

You will no doubt see the president make frequent references to how his administration swooped in and helped a struggling refinery stay in business, saving 850 union jobs and keeping gas prices low.

But we should remember that had Obama's EPA ended its war on the oil and gas industry, had it embraced traditional energy sources rather than trying to undermine them, had it cut all refineries a little slack, there might never have been a need to save the Sunoco refinery in the first place.

Saving one refinery is good; creating an environment so that all refineries-and other manufacturing industries-can flourish is much better.

Merrill Matthews is a resident scholar at the Institute for Policy Innovation in Dallas, Texas.