The doctrine or belief that in the system of things all that happens, the undesirable no less than the desirable, is for the best
The phrase "the best of all possible worlds" was coined by the German polymath and Enlightenment philosopher Gottfried Leibniz in his 1710 work Essais de Théodicée sur la bonté de Dieu, la liberté de l'homme et l'origine du mal, more commonly known simply as the Theodicy. The claim that the actual world is the best of all possible worlds is the central argument in Leibniz's theodicy, or his attemp... Wikipedia