The public lynching, so long out of favor, has been revived by Defense Secretary Caspar Weinberger. For the purchase of some outrageously over- priced ashtrays, he has either ended or soiled the careers of three Navy officers, one of them an admiral with 33 years' service. As always with a lynching, guilt is besides the point. The idea is to make a public statement.

And so Weinberger has. His intention was to say loudly and clearly that the Defense Department would no longer tolerate expenditures that both turn the heads of the taxpayers and sicken their stomachs. Among such items are the now-legendary $435 hammer, the $7,600 coffee maker, the $91 screw and the Allen wrench that costs more than a car but will probably last longer -- a bargain at only $9,000.

The latest outrage is ashtrays. For a mere $659, the Grumman Aerospace Corp. offered to sell airplane ashtrays to the Navy; and the government, knowing a deal when it sees one, bought seven. Sooner or later, as these things go, nosy congressional investigators looked at the books, recoiled at what they saw, and the figures found their way into the press. It was then that Weinberger, following the recommendation of Navy Secretary John Lehman, acted. He disciplined three officers -- an admiral, a captain and a commander.

Maybe the officers got what they deserved. But the time to know that is after an investigation, not before. It just could be that the three -- or any one of them -- are either innocent or have a reasonable explanation for what went wrong. Even in the Navy, there should be such a thing as due process. After all, Weinberger did not suspend Adm. Joseph Metcalf while he was being investigated for bringing home some souvenirs of the Grenada invasion -- Soviet automatic rifles. So why the rush now?

The answer is that these relatively minor examples of outrageous Pentagon spending have the potential of endangering the most outrageous procurement program of them all -- the Defense Department budget itself. At long last, Congress is beginning to cast a cynical eye on the Reagan administration's budget requests, and the House, locking the barn door trillions of dollars too late, has even imposed zero growth on Pentagon spending. Still, the Reagan administration's $2.3 trillion arms buildup remains largely on track and largely untouched. When you're talking $2.3 trillion you can afford to lose several billion here and there or, as actually happened with Weinberger, tell Congress that you found a few billion in the Pentagon's penny jar.

The numbers may dazzle or, even, bring on vertigo, but they are important. In fact, the numbers -- the amount of money being spent -- is maybe more important than the weapon systems they buy. Early on, the Reagan administration did not have an arms policy; it had a spending policy. The idea was to impress the Soviets not just with missiles in the ground or planes in the skies, but also with the sheer incredible amount of money we were willing to spend on arms. We were going to better the boast of Nikita Khrushschev. He said the Soviets would bury us; we'll make sure they can't afford the plot.

Whether all this money buys increased security is debatable. It certainly has not yet produced a meaningful increase in defense capability -- air power, for instance. But it is beyond debate that everyone in the defense establishment -- from the lowly double-billers at some contractors, to the most admirable of admirals in the Navy -- knows that the Pentagon is willing to spend money, and it almost doesn't matter on what. You can hardly blame them, then, for not caring if the money was being wasted on ashtrays or on a weapons system, like the MX, which will either be bargained away at Geneva or left to rust in their silos. Either way, the MX represents a bigger waste than an ashtray any day.

The officers dangling from Weinberger's yardarm are probably neither knaves nor fools and would not willingly sacrifice their careers for the sake of a better ashtray. Rather than being the exceptions Weinberger would make of them, they are representative of a defense establishment that has confused the spending of money with the buying of security. Their swift lynching is a diversion. After all, if you think the ashtray is something, you should see the plane.