Ajax is considered great (though flawed) because he has proven himself time and again on the battlefield, but he is punished harshly by the gods when he disrespects them by spurning their help.
Odysseus is perhaps the "greatest" of the greats. Another great warrior, it is he who is given the shield of Achilles (this prize was denied Ajax), keeps a calm head during the bitter arguments about Ajax's burial, and is a good arbiter of disputes of all sorts. He proves himself to be a true leader and great man through both word and action.
Agamemnon is also a great warrior. He ends up "doing the right thing" by allowing Ajax to be buried.