IN THE MATTER of the Environmental Protection Agency we have a Washington extravaganza of classic dimensions, a veritable text in the ways of our city. We also have a lot of fun.

Oh there is wretched excess, to be sure. The spectacle of Rep. John D. Dingell (D- Mich.) comes to mind. So recently leading the charge against strict air pollution controls, he now is a crusader against abuses in the Reagan administration's EPA. There's also room to wonder at the quantity of column inches and broadcast minutes the news media have suddenly discovered ought to be devoted to environmental protection. When there's a juicy story going, you can't accuse our news media of self-restraint.

But free men and free institutions are by nature disorderly, and the flamboyant character of an extravaganza like this one should not disguise its substantive significance. What we are watching here is an aspect of the democratic process that is actually very effective. This is not a case of demagoguery (though it features some petty demagogues), nor an outrageous invention of "the media," nor just another political football.

We're not talking about allegations of improper or illegal behavior, primarily. No, this is a rough-and-tumble political contest over an element of the Reagan administration's domestic policy that never was popular, and is now up for grabs. In all likelihood, the outcome will be a changed policy and an Environmental Protection Agency under new management.

From the outset two years ago, the Reagan administration set a course for environmental policy that flew in the face of popular opinion, as even the White House's own polls made clear. The swing voters who elected Ronald Reagan president did so (the exit polls confirmed) mostly because he was not Jimmy Carter, and not because they shared the James Watt-Anne Gorsuch/Burford view that the federal government had little if any business in protecting the environment.

The politics of this situation was not a secret. Before last year's election the top officials of EPA itself realized they were vulnerable to charges of lax enforcement, and urged their regional offices quickly to come up with cases for possible prosecution. Watt oversaw preparation of a watered-down version of the Clean Air Act that the White House itself disavowed when political advisers said it would be foolhardy to openly promote legislation that would be so unpopular. The administration has never claimed it had a popular policy, even as it has stuck by its policy.

That policy had long been a target of the "environmental community," an amorphous but considerable group including big organizations like the Sierra Club, public interest lawyers like those at the Natural Resources Defense Council, many members of Congress in both parties and -- a large category -- former environmental officials of previous Democratic and Republican administrations. Opponents of the administration's efforts to decimate the EPA by cutting its budget wholesale had actually formed a group called "Save EPA" -- you can find it in last year's Washington phone book.

More than that, the issue of potential conflict of interest at the top of EPA had been thoroughly aired long before Rita Lavelle's firing set off this latest round of excitement. Lavelle's own appointment had been criticized because of her past employment in the chemical industry.

When reporters recently approached Denver lawyer James W. Sanderson, whom Gorsuch/Burford tried to appoint to the EPA and who is now under investigation for conflict of interest while he was a consultant to the agency, he replied accurately, "I thought I was old news."

But none of this seemed to matter much until the administration flouted one of this city's cardinal rules. Nothing except -- maybe -- sexual misbehavior eggs on Washington's wolves like the appearance of a cover-up. Last September, when the Justice Department and the White House decided to claim "executive privilege" to withold from congress some disputed EPA documents, the administration made the uncomfortable bed in which it now tosses and turns.

The appearance of cover-up put EPA on the front page. Then came the irresistible soap opera set off by the announcement four weeks ago, late on Friday evening, that Lavelle had resigned her job as assistant administrator of the agency. Of course Lavelle had not resigned, so on Monday the president himself had to fire her, a messy little spectacle that led to this whole gory show.

If you talk to enough of the players and spectators in this extravaganza, you learn that Gorsuch/Burford took on a formidable group of articulate, determined and effective people. The environmentalists may make good sport for Doonesbury, but they are obviously competent operators.

The same cannot be said for Gorsuch/Burford or the people around her (most of them installed by the White House personnel office) at the top of EPA. This is one of those important factors in a Washington situation that reporters don't know how to deal with. How do you say in a news story that EPA is being run by "a lot of second rate, low-wattage personalities," as one former Justice Dept. official described them?

But there is more to the story than incompetence. This episode illustrates many of the essential elements of Washington life.

For example, there are forces at work in this city that are beyond the reach of any administration, even one swept into office by a landslide and led by a great communicator. Those forces are strengthened when a mid- term election suggests the new administration's political standing is slipping.

Hence civil servants at EPA -- who initially misjudged their new bosses, probably because Republicans had founded the agency and provideddits best leaders -- could help build a case against Gorsuch/Burford and her colleagues.

"I'd get something in a plain brown envelope from someone at EPA," recounted a former top official of the agency who participated in the effort to undermine the new management from his new position in private life. "It would show, for instance, that one of the assistant administrators had been having lunch and dinner with people that he or she was supposed to regulate. So I passed this on to people on the Hill, and to some friends in the media."

Of course it is no secret that Congress has some clout in this town, but Gorsuch/Burford apparently missed that lesson or decided to ignore it. Once confirmed, she seemed to decide that Congress deserved little from her but contempt. While the "Reagan mandate" hovered intimidatingly over Capitol Hill, Gorsuch/Burford got away with simply disregarding traditional congressional prerogatives. "I have never seen any public official hold such utter contempt for Congress and express it so freely," said Leon Billings, a former aide to Sen. Edmund Muskie (D-Maine) who helped draft the early antipollution legislation.

"These people just have not cared (about Congress)," according to Rep. James J. Florio (D-N.J.), chairman of the House subcommittee with principal jurisdiction over EPA. "You can't take money away from them because they don't need money" for the agency. Indeed, Gorsuch/Burford and her colleagues couldn't even be threatened with repeal of the basic legislation they administer, since they disapprove of much of it, too. "They just fundamentally violate the letter of the law," Florio said. Not surprisingly, he is now welcoming the chance to get even.

Once this town has a certifiable big event going, a lot of people want to get a piece of it. The article you are reading is one example of that phenomenon. The proliferation of congressional investigations into EPA is another. The outpouring of media attention is the best evidence that there's a big new item on the Washington agenda.

At the beginning of August, 1977, you could have gotten 1,000-to-n1 against the proposition that business practices in small- town Georgia banks were about to become a big Washington news story. By the end of the month (thank you, Bert Lance) they were. Once one of these balls gets rolling "there is an avalanche or snowballing effect," observes Rep. Elliott H. Levitas (D-Ga.), proprietor of one of the investigations into EPA. "There comes the fury of the sharks."

In this case it was even easier to make the avalanche happen. Environmental protection really is a popular cause; it takes no special pleading to convince people of its significance. Once it became obvious that something really was seriously askew at EPA, the media jumped right in.

Leonard M. Downie Jr., the national editor of this newspaper, noted that most elements of the EPA story had been in the paper before this past month, but "the messiness of Lavelle's firing" changed the atmosphere. "The difference was, it hadn't (previously) caught the rapt attention of Washington or of editors here," Downie said.

Once that attention was captured, reporters who had covered EPA and sources inside the agency with old grievances were both able to revive old information and story ideas, and found there was now an eager market for them. At the same time, news organizations began to compete for new tidbits. "There has been a lot of pack journalism" in the last few weeks, Downie acknowledged. 'It's a real worry. We're trying to keep only legitimate stories in the paper."

It's fashionable to argue that the media have great power over the nation's events, but in fact, the media by themselves aren't that potent. Bob Woodward and Carl Bernstein would have been whistling in the dark without help from the FBI, Judge John Sirica, Sen. Sam Ervin and the rest. It's at times like this, when the media and some official organ that has subpoena power are working along parallel lines, that the power of the press comes into play.

Once one of these episodes gets underway, Washington's standard (and usually accurate) grays are turned into black and white. Those who had decided, on balance, that Gorsuch/Burford was essentially anti-environmental protection, can now portray her as single-mindedly and relentlessly so.

You're unlikely to be reminded often in the near future that she managed to hire 25 criminal investigators to look into violations of the statutes EPA enforces -- something environmentalists in the Carter administration had pushed for without success. "It really doesn't matter what she says now," observed the generous veteran of the Carter administration who acknowledged that accomplishment. "People just won't believe her." This is true, and it is one reason why she won't last as administrator.

But the blacks and whites here are not contrivances; they reflect reality. Those 25 investigators do not compensate for Gorsuch/Burford's other policies, which have indeed had the effect of vitiating enforcement of the environmental laws. A large part of the credit for that accomplishment goes to the White House, whose budget cuts have dramatically reduced the agency's staff, and thus its ability to do anything. But the attitudes at the top of the agency also demonstrate that aggressive enforcement of the law is not a top priority at EPA today.

In an ideal world there would be a neater way to make the system work -- to reign in an administration whose policies have defied congressional and popular will, and whose officials appear to have stretched if not violated the bounds of proper behavior. In that perfect place there would be an office where newspaper editors could verify whether their stories were fair or foul, and where members of Congress could inquire if their behavior was honorable or just grandstanding.

But we don't live in an ideal world. We live in Washington, D.C.