Rabbi Chiya, Rabbi Yitzchak and Rabbi Yosei were walking on the way and met Rabbi Aba.
Rabbi Aba quotes 1 Kings 8:16 and say that the beginning and the end of the verse don’t look as connected. It says first, ‘I didn’t choose a city’ then it says ‘I chose David’ when it was proper to say ‘I Chose Jerusalem’
1 Kings 8:16
“מִן הַיּוֹם אֲשֶׁר הוֹצֵאתִי אֶת עַמִּי אֶת יִשְׂרָאֵל מִמִּצְרַיִם לֹא בָחַרְתִּי בְעִיר מִכֹּל שִׁבְטֵי יִשְׂרָאֵל לִבְנוֹת בַּיִת לִהְיוֹת שְׁמִי שָׁם וָאֶבְחַר בְּדָוִד לִהְיוֹת עַל עַמִּי יִשְׂרָאֵל”
“Since the day that I brought My people Israel from Egypt, I did not choose a city out of all the tribes of Israel in which to build a house that My name might be there, but I chose David to be over My people Israel.’”
The Zohar explains that when God wants to build a city, he watches the leader of the people, build the city and then gather the people into it. The verse above tells that God waited until David became a leader, worthy of leading the children of Israel. The city and its people depend on their leader. If the leader is good, then he and the city enjoy blessings. If the leader is bad, then all suffer.
The verse below reveals that God chose David to lead because of his merits.
1 Kings 11:34
“וְלֹא אֶקַּח אֶת כָּל הַמַּמְלָכָה מִיָּדוֹ כִּי נָשִׂיא אֲשִׁתֶנּוּ כֹּל יְמֵי חַיָּיו לְמַעַן דָּוִד עַבְדִּי אֲשֶׁר בָּחַרְתִּי אֹתוֹ אֲשֶׁר שָׁמַר מִצְוֹתַי וְחֻקֹּתָי”
“Nevertheless, I will not take the whole kingdom out of his hand, but I will make him ruler all the days of his life, for the sake of David my servant whom I chose, who kept my commandments and my statutes.”
“אַשְׁרֵי שֶׁאֵל יַעֲקֹב בְּעֶזְרוֹ שִׂבְרוֹ עַל יְהוָה אֱלֹהָיו”
“How blessed is he whose help is the God of Jacob, whose hope is in YHVH his God,”
The Zohar asks why ‘the God of Jacob’ and not ‘of Abraham’ or ‘of Isaac’ and explains that when Jacob run away from his brother Esau that wanted to kill him, he left alone without money. Jacob had complete trust in God.
“וַיִּדַּר יַעֲקֹב נֶדֶר לֵאמֹר אִם יִהְיֶה אֱלֹהִים עִמָּדִי וּשְׁמָרַנִי בַּדֶּרֶךְ הַזֶּה אֲשֶׁר אָנֹכִי הוֹלֵךְ וְנָתַן לִי לֶחֶם לֶאֱכֹל וּבֶגֶד לִלְבֹּשׁ”
“Then Jacob made a vow, saying, “If God will be with me and will keep me on this journey that I take, and will give me food to eat and garments to wear,”
For his commitment God protected and provided Jacob with all his needs.