For whom was the world created? “Rav said, the world was created for David. And Shmuel said, for Moses and Rabbi Yochanan said, for Mashiach.” What lies behind these three opinions?
Moses and King David represent two opposite dynamics: “Moses commanded the Torah to us.” His focus was on bringing the Torah down to earth – direct light from heaven above. King David, who said about himself, “And I am prayer,” turns to God Above from below, with returning light. From the crises of reality and the feeling that he has nothing of his own, he prays to God, sings to Him and thanks Him for everything. Rav and Shmuel, the first of the Amora’im of Babylon, are actually debating whether the main purpose of creation is Torah or prayer.
We can understand that Rabbi Yochanan, the Amora’i from the Land of Israel who contends that the world was created for Mashiach, is referring to a synthesis of the two previous opinions. Mashiach is comprised of the soul of Moses (“He is the first redeemer and he is the final redeemer”) and the body of David (from whom the Mashiach biologically descends). But it is written that “The world stands on three things; on Torah, on service of God and acts of kindness.” Rav and Shmuel referred to the service of the heart, which is prayer and the service of the mind, which is Torah study. If we follow the pattern, we can say that Mashiach embodies acts of kindness (the service of the liver, “the main thing is action.”). In Babylon, the Diaspora, the Jewish People engages mainly in Torah and prayer. But in the Land of Israel, we must also engage in settling the Land and redeeming the world, following the path and attributes of God with giving, creativity and building.
On a deeper level: Moses represents the pure Torah, which he brought to us from heaven – a straight, consummate guiding light. Those who tread this path are consummately righteous people. Creation of the world for Moses means that God created the world for the pious people. By contrast, King David established the concept of individual repentance. King David, who navigates amidst the crashing waves of reality, teaches us that “a tzaddik can fall seven times and arise.” Creation of the world for David means that God created the world for the penitents, those people who return to God after they have fallen.
What then, is the role of Mashiach? The service of the pious and the penitents is focused, in a certain manner, on themselves. The pious person is defined by his conduct that is consummately according to the Torah – which he safeguards to the very best of his ability. The penitent is engaged in rectifying his past misdeeds. But a person who is concerned with bringing the Mashiach does not think of himself at all – not as a pious tzaddik and not as a penitent. He is completely devoted to his role and mission. This is the service required of Chassidim, who are lovingly connected to their Rebbe and devote themselves to executing his orders and disseminating his Torah teachings.
According to these concepts, Torah and prayer are service between man and God, while the performance of acts of kindness requires one to forget himself and think only of others – with Torah study and prayer also devoted to the sweetening of reality.
In Hebrew, Mashiach is an acronym for Melech, Chasid, Yirai Shamayaim (king, chassid, fearer of Heaven) who is completely devoted to his mission. Creation of the world for him means that the purpose of the world is the service of Chassidim – performing acts of kindness.
 Sanhedrin 98b.
 Deuteronomy 33:4.
 Psalms 109:4.
 Shemot Rabba 2:4.
 Pirkei Avot 1:2.
 Proverbs 24:16.