In Endgame, the character Hamm, in particular, oozes vanity. He claims to have once been a sort of monarch. In the present, he is blind and wheelchair-bound, completely dependent on other people. Yet he has still not given up on thinking of himself as a king. Having lost compassion and desire, human pride proves to be one of the last traits to go. For example, Hamm has Clov make him a stuffed dog, which Hamm imagines gazing up at him imploringly. Perhaps that reason they can't figure out that keeps them all going is precisely this undying pride. They are beat but they cannot admit it because they are too vain.
In the play, vanity and humor are both sources of strength. Clov seeks solace in absurdity, Hamm and Nagg in vanity, and Nell, who can find neither, is the first to give up and die.
Pride is the means by which Hamm conceals his weaknesses from Clov. Because he has cast himself in the role of master, he is unable to reveal his vulnerabilities to Clov and so he acts vain and cruel.