"By ten pronouncements the world was created." (Avot 5:1)

There is the question that all the early sages raised: Why did the Almighty not create the world before that particular time - since activity is always better than its absence? And why did the will of G‑d change from no desire to a desire [for the world] specifically at the time of the Creation, and not before? Surely G‑d is not given to changes of heart, in keeping with the verse "I the L-rd do not change". (Malachi 3:6)

When His will produced the desire to create the world, this desire was not something new….

The answer is that G‑d is utterly unlike a mortal worker of flesh and blood. In the case of a mortal worker, the wisdom he has now he did not have before. His wisdom has to be acquired, and is capable of being deficient. To give an example: because he needs a place to live, when he acquires the wisdom to build himself a house, then he builds himself a house.

As for G‑d, though, His wisdom is organically, inherently His; it is not acquired; and it cannot be deficient. Consequently, when His will produced the desire to create the world, this desire was not something new that arose with Him at the time of the Creation. Rather, just as He was in eternal pre-existence, so was this will eternally pre-existent. From infinitely far in the past it was His desire to create the world at the particular time that He did bring it into being, and not before. Therefore, when the world was created, it was actually, literally, at the right and proper time - as it had been His ever-pre-existing will to create it specifically then. Hence there was absolutely no change whatever of His will.

There is another world destined for the ultimate future….

The proof of this is that there is another world destined for the ultimate future - a world that will be entirely a Shabbat, a holy setting of blessed rest, in which the tzadikim will sit crowned with their diadems (Berachot 17a); "And the L-rd alone shall be exalted on that day" (Isaiah 2:11). The spiritual level of that world will certainly be greater than the level of the world that exists at present; and a good activity like that is certainly better than its absence. Then why hasn't the Almighty created it long before it was actually brought into being?

The only truth is that everything must come precisely at its right and proper time. Just as it is the way of the Shabbat to come specifically after six weekdays, so it was with the creation of the world: Although G‑d knew that the activity (of Creation) would be better than its absence, His will nevertheless opposed His knowledge. For through the infinite past, just as there was His knowledge that this activity would be good, so was there very much His will not to carry out this activity at once, before the proper time would come. Hence He ignored His knowledge and followed His will…So Scripture says, "He has made everything fine in its season" (Ecclesiastes 3:11) - including the world. This is a profound esoteric principle, which the learned man of intellect should comprehend.

The foreknowledge of evil was created as a test and trial for the tzadikim….

Now, this itself gives us the explanation in regard to divine foreknowledge and the free will that yet remains for a man. It might seem hard to understand how there can be any reward for a righteous, pious man, and punishment for the wicked. After all, G‑d knows everything - "and there is knowledge in the supreme Divine One" (Psalms 73:11). He has beheld and foreseen to the end of all generations; hence He has known beforehand that this man will be a tzadik; so the man must inevitably be a tzadik - and consequently it is not just to reward him. Likewise, He has known beforehand that the man will be wicked; then he deserves no punishment - since he has not the ability to change His knowledge.

This is not so, however. For although G‑d had foreknowledge, it is His wish nevertheless that people should improve their behavior. It was for this reason that He gave us the entire Torah and the mitzvot - to do His will. Hence, you see, His wish opposes the divine foreknowledge that precedes His thought. Therefore a man is able to be drawn after the will of G‑d - and not after the prescient divine knowledge. This is because the wish can outweigh the foreknowledge, since G‑d has no desire for that knowledge and that way of action. The knowledge was not to His liking, by His wish.

Then if a man wills, he can change his actions in accord with G‑d's desire. He need not lower himself and descend to the level of His knowledge, because the foreknowledge of evil was created as a test and trial for the tzadikim. As we read in Scripture, "the L-rd your G‑d is testing you" (Deut. 13:4) - for this world is a world of trial and test, since the spirit was sent [from the heavenly realm] to undergo testing in this world: If a person commits a sin, he thus goes along with the divine foreknowledge. If he does not commit a sin, he thus goes along with the divine desire and commandment, which stand in opposition to His foreknowledge. In allusion to this, Scripture says, "…an offering by fire, a pleasing aroma to the L-rd" (Lev. 1:9 as Rashi explains, it means) that "it is a spiritual satisfaction to Me (says the Almighty) that I spoke, and My wish was done."

Understand this well.

[From Keter Shem Tov, excerpted from The Baal Shem Tov on Pirkei Avot by Charles Wengrov (Inst. for Mishnah Research)]