The Pentagon is still spending millions on a warhead to penetrate missile defenses that both the United States and the Soviet Union have agreed not to build.

Latest confirmation of this continuing quest for a zig-zagging nuclear warhead to foil any defenses that might be built someday came Thursday in a routine contract ammouncement by the Pentagon.

Lockheed's missile division, the announcement said, will receive $72.7 million to design and test a maneuverable warhead for missiles fired from submarines.

The nuclear warheads the United States and the Soviet Union now have aimed at each other would glide to their targets after being released by the missiles that carried them into space.

Such straight-flying warheads, according to enthusiasts for zig-zagging ones, are easier for antiballistic missiles (ABMs) to hit than are maneuverable ones. The Pentagon, bending to this argument, had spent $193.5 million on developing maneuverable warheads before Thursday's announcement.

Critics of pushing on to the next generation of warheads, like the Mark 500 Evader now under development, have complained that stepping up the technological march defeats the purpose of arms control agreements such as the 1972 ABM treaty.

Under that agreement, as amended in 1974, the United States and the Soviet Union have agreed to leave themselves undefended against incoming warheads, except for one ABM site in each country. That treaty next comes up for review in 1982.

But the existence of the ABM treaty, in the view of Pentagon leaders, does not rule out effective missile defenses being built in the future. Therefore, they argue, the United States must keep spending money on warheads like the Mark 500 Evader to penetrate future defense.

Under the action-reaction phenomenon of the arms race, better offensive weapons spur the superpowers to develop better defensive ones. The United States and the Soviet Union are still trying to develop a better ABM, despite the treaty.

The same search for better weapons will continue even if the pending SALT II accord is ratified. Defense Secretary Harold Brown has said that spending on strategic weapons will have to increase from today's level under the treaty, but not as much as would be the case if the strategic arms limitation treaty is rejected.

Lockheed, under this newest Mark 500 Evader contract, will build and test the warhead for the Trident I missile going in Poseidon submarines already in service.

The Navy, in a prepared statement on the Lockheed contract, said the modifications on the Mark 500 Evader for submarines will "improve the penetration capability against advanced antiballistic-missile systems,"

The maneuvering warhead is to be tested on Trident I missiles about once every 15 months under the three-year life on the contract, according to the Navy.