After the death of Ajax, the rest of Sophocles' play Ajax centers on the debate about whether to bury his body. Why does Odysseus defend Ajax and argue in favor of burial?
In Sophocles' play Ajax, as in the Homeric epics, Odysseus is an intelligent and devious character, who has complex reasons for everything he does and says. Before Ajax's suicide, Odysseus has been told by Athena that the madness of Ajax was caused by the gods, and she seems to be suggesting that Odysseus should treat him leniently.
The clearest explanation of Odysseus' reasoning occurs in his debate with Agamemnon. He says:
In deference to the gods
don’t be so unyielding you throw Ajax out
without a burial.
The duty of burying corpses, and the notion that an unburied corpse would cause ritual pollution, or "miasma", bringing down the anger of the gods on the entire community, was an important element of Greek religion, as can also be seen in Sophocles' Antigone. This is one major reason why Odysseus wants to bury the corpse.
Next, Odysseus warns Agamemnon that his anger and impulsiveness might lead to bad consequences. An ancient Greek audience would immediately have remembered the opening of the Iliad, where Agamemnon's picking a fight with Achilles nearly caused the Greeks to lose the war, by leading Achilles to withdraw from the fight. Burying Ajax will prevent similar dissension from tearing apart the rather fragile alliance of Greek states in Agamemnon's army.
Also, Ajax was a great warrior who fought on the Greek side and thus deserves the honor of a burial. Finally, Odysseus suggests that burying Ajax will make Agamemnon appear just, benevolent, and statesmanlike.