If Libya's Muammar Qaddafi is the barbarian leader of an outlaw terrorist regime, why are five American oil companies still doing business in Libya, helping Libya sell its oil and earn currency it uses to import food, weapons and export terrorism?

This is a loaded question, but a real one that was raised again yesterday by Rep. David R. Obey (D-Wis.), chairman of the House Appropriations subcommittee on foreign operations.

Despite the escalating conflict between the United States and Libya, the five companies -- Amerada Hess Corp., Conoco Inc., W. R. Grace & Co., Marathon Oil Co. and Occidental Petroleum Corp. -- continue to serve as the distributor and marketer for a significant share of Qaddafi's oil, transporting it to European markets and selling it.

The companies also make a profit on the smaller percentage of the Libyan oil exports that they are allowed to keep and sell for themselves.

"Last year, they probably sold 100 million barrels of oil on behalf of Qaddafi and produced revenues for Qaddafi of $2 billion in taxes which he then used for his purposes," said Libyan expert Henry Schuler of the Georgetown University Center for Strategic and International Studies, during a television interview this week. Some experts estimate the companies made more than $100 million in revenues on their Libyan trade last year.

"For the life of me, I do not understand the wisdom of allowing U.S. firms to support with hard cash a Libyan government dedicated to terrorism," Obey said in a House speech yesterday. "I doubt very much that the American people, if they knew, would want to subsidize Qaddafi's terrorism, yet that is what they're being forced to do," he said.

The other argument, made by the companies and the Reagan administration, is that the companies' continuing role in Libya is the best of the bad options currently available.

The companies, which have long-standing relationships with Libya, are there with the specific approval of the administration, which temporarily exempted them from Reagan's order directing U.S. firms to leave Libya.

If the oil companies quit Libya, Qaddafi would easily find others to sell his oil, these officials say. As long as the five companies remain in Libya, Qaddafi at least is denied the share of Libya's oil exports which the companies may sell themselves.

The five companies are entitled to a 16 1/2 percent share of Libya's exports, but they must make heavy tax and royalty payments to Libya, equal to 92 cents on the dollar, in the case of W. R. Grace. If Grace pulled out, Qaddafi would get 100 percent, a company spokesman said.

All told, Qaddafi would reap a $1 billion windfall if the companies left, the Treasury Department estimates, counting the value of the U.S. share of Libyan oil reserves, their oil field and transportation assets, and the U.S. companies' share of Libyan oil exports.

At this point, it isn't possible to verify the estimates because the companies have divulged their Libyan oil numbers only to the administration. "That's a figure we have not discussed publicly," although the Treasury knows it, said Ralph E. Bailey, chairman of Conoco, in an interview. "It is substantial. . . . There is a very substantial part that hasn't been written off."

So the case for permitting the American companies to remain in Libya is the windfall argument. And that rests on the assumption that Qaddafi can sell his oil, or most of it, without the companies' help.

"It's a certainty that the Libyans have the ability to produce the oil and sell it," without the U.S. companies, said Bailey.

Conoco does not operate the Libyan oil fields, it is selling Libyan oil that Libya is fully capable of producing and selling on its own, Bailey said. Conoco remains in Libya in accordance with U.S. policy, which permits Conoco to stay while it tries to sell its assets there to the Libyans. "This oil would otherwise be sold by the Libyans and they would pocket the revenues," Bailey said.

According to Schuler, Qaddafi needs the expertise of the five companies to sell Libya's oil in today's glutted oil markets.

The administration does not see it that way. "We have seen no evidence that the departure of the American oil companies would impede Qaddafi's ability to produce and market Libyan oil," said an administration official who asked not to be identified. During January and February, when the companies had cut back their activities, Libyan oil shipments did not drop. They may even have increased, the official said.

The fundamental problem is that buyers for Qaddafi's oil still are lined up in Europe and elsewhere. The "hard currency" flowing to Qaddafi isn't dollars. It is West German marks, French and Swiss francs, and Italian lira, one administration official said.

If Qaddafi can sell the oil, then the revenues the American companies take away from Libya is money denied to the Libyans.

There remains, however, the fact of American oil companies continuing to work in partnership with Qaddafi, a deeply troubling spectacle that may well give Europeans another argument for continuing to buy Libyan crude. On that basis alone, it looks less and less like a good bargain.