Beckett was extremely taken with what it meant to be alive – to exist. He was particularly interested in what it meant to exist in a world that seemed to resist any search for meaning to one's life. While a lot of 'humanistic' texts talk about how great it is to be a human being and how dignified we all are, Beckett was obsessed with the nasty underbelly of 'humanism.' What about people who cannot, despite their best efforts, lead dignified lives? What about the tramps and the servants and all the people who get stepped on while the rest of us are busy trying to create an ideal world? The characters in Endgame are borne out of the dark side of humanism.
The pessimism of the play allows Beckett to explore certain themes that are often ignored by optimistic philosophies. In particular, Beckett considers the fact that life is a horrible task to be endured; these statements would not be possible if he took a different attitude toward the material.
Hamm and Clov do not want their lives to have a meaning. Their suffering is so great that they think it would be better if everything was purposeless and given up to chance. They cannot conceive of a great 'plan' that would justify their suffering, and so meaninglessness becomes a sort of relief.