Rabbi Yudan in the name of Rabbi Isaac: Whenever Israel hold back [tarry] in the synagogues and houses of study, the Holy One holds back His Presence with them. What is the proof? "Let us detain you, and we will prepare a kid for you" (Judges 13:15). Rabbi Chaggai in the name of Rabbi Isaac: Whenever Israel wait hopefully in the synagogues and houses of study, the Holy One, blessed be He, places His hope, His Presence, with them. What is the proof? "I waited hopefully for the LORD, and He turned to me" and so forth (Psalms 40:2). Rabbi Alexandri [told a parable] of a king to whom a joyous occasion had come, and throughout all seven days of the feast the queen kept hinting to the courtiers, saying to them: while the king is busy with his celebration, ask for your needs. But since they did not understand, the queen held them back one more day. So too, throughout all seven days of the Festival the Torah keeps hinting to Israel, saying to them: ask the LORD for rain. Know that this is so, for [in the verses describing the festival offerings] it says "and their drink offerings" on the second day (Numbers 29:19, reading with mem), "and her drink offerings" on the sixth (Numbers 29:31), and "according to their ordinance" on the seventh (Numbers 29:33) - mem, yod, mem, spelling "water" [mayim]; from here is derived the water libation [drawn] from the Torah on the Festival. And since they did not grasp it, the Torah held them back one more day. Therefore Scripture must say, "On the eighth day" (Numbers 29:35).
When Israel Lingers in the Houses of Study the Shekhinah Lingers
Pesikta DeRav Kahana 28:8
[ח] ר' יודן בשם ר' יצחק כל זמן שישראל מעצרין בבתי כנסיות ובבתי מדרשות הק' עוצר שכינתו עמהם. ומה טעמא, נעצרה נא אותך ונעשה לפניך גדי עזים (שופטים יג:טו). ר' חגי בשם ר' יצחק כל זמן שישראל מקווין בבתי כניסיות ובתי מדרשות הקב"ה מקוה שכינתו עמהם, ומה טעמ', קוה קויתי י"י ויט אלי וג' (תהלים מ:ב). א"ר אלכסנדרי למלך שבאת לו שמחה, וכל שבעת ימי המשתה מטרונא מרמזת לבני פלטין ואמרת להם, עד שהמלך עסוק באלרוייא שלו שאלו צורכיכם, וכיון שלא הבינו כבשה להם מטרונא עוד יום אחד. כך כל שבעת ימי החג התורה מרמזת לישר' ואמרת להם שאלו מי"י מטר, תדע לך שהוא כן, בשיני, ונסכיהם (במדבר כט:כט), בשישי, ונסכיה (שם שם לג), בשביעי, כמשפטם (שם שם לג), מם יוד מם, מים, מכן לנסוך המים מן התורה בחג. וכיון שלא התבוננו כבשה להם התורה עוד יום אחד. לפיכך צריך הכת' לומ' ביום השמיני (במדבר כט:לה).