“The strength of His works He related to His people to give them the inheritance of the nations” (Ps. 111:6).
The first Rashi on the Torah questions the purpose of the creation story. The above verse teaches the purpose was to give Israel the inheritance of the nations.
A number of other reasons have been given in contrast to what comes across as giving a side benefit. However, there is a Midrash that Jacob and Esau made a deal. Jacob would take the next world, and Esau would take this one. This world, then, is not our inheritance, but the inheritance of the nations. How then can we have anything of this world?
The answer is that we live in this world in terms of the next world for Godliness. The Torah therefore tells us that God created the world to thereby give us what would otherwise be the inheritance of the nations.