Context: The underlying problem of Candide is the problem of Job: How can evil, particularly when it afflicts the innocent, occur in a world created by an omniscient and beneficent deity? In the eighteenth century, many people, taking their cue from Leibnitz, accepted the belief that this is not simply a good world, but that it is the best of all possible worlds. They did not try to deny the existence of evil, but they claimed that evil was a necessary ingredient in a universe that is, taken as a whole, good. From such a start, they concluded that man has to accept his lot, that what seems evil to the individual is really essential in the total harmony of goodness in the world. Voltaire could not sympathize with such a theory; after the disastrous Lisbon earthquake in 1755 he decided to speak out, as he did in "Poem on the Lisbon Disaster" and in Candide, against philosophical optimism. In Candide, Dr. Pangloss (All-tongue) is a fool–and the exponent of optimism:
Pangloss taught metaphysico-theologo-cosmolonigology. He proved admirably that there is no effect without a cause and that in this best of all possible worlds, My Lord the Baron's castle was the best of castles and his wife the best of all possible Baronesses.
"'Tis demonstrated," said he, "that things cannot be otherwise; for, since everything is made for an end, everything is necessarily for the best end."