Voltaire wrote Candide in order to satirize the then-popular philosophy of optimism.