"For the LORD is a God of knowledge" (1 Samuel 2:3). Rabbi said: I wonder how they cancelled "Who graciously grants knowledge" on the Sabbath, for if a person has no knowledge, how is he to pray? Rabbi Pinchas said: Great is knowledge, for it is placed in the middle between two mentions [of the Divine Name], "then you will understand the fear of the LORD and find the knowledge of God" (Proverbs 2:5), and it says, "For the LORD is a God of knowledge." Rabbi Elazar said: Great is knowledge, for it is weighed against the Holy Temple, "the place for Your dwelling that You made, O LORD, the Sanctuary, O Lord, that Your hands established" (Exodus 15:17). And the Rabbis said: Anyone who has no knowledge in him, it is forbidden to have compassion on him. And what is the reason? "For it is a people of no understanding; therefore He who made it will not have compassion on it" (Isaiah 27:11).
Why Knowledge Outweighs the Temple in Midrash Shmuel
Midrash Shmuel 5:9
כי אל דעות ה' (שמואל א' ב' ג'), אמר רבי תמיה אני היאך בטלו חונן הדעת בשבת, שאם אין באדם דעת היאך הוא מתפלל, אמר רבי פנחס גדולה היא הדעה שהיא ממוצעת בין שתי אזכרות, אז תבין יראת ה' ודעת אלהים תמצא (משלי ב' ה'), ואומר כי אל דעות ה', אמר רבי אלעזר גדולה דעה שהיא שקולה כנגד בית המקדש, מכון לשבתך פעלת ה' מקדש ה' כוננו ידיך (שמות ט"ו י"ז), ורבנין אמרין כל מי שאין בו דעת אסור לרחם עליו, ומה טעמיה כי לא עם בינות הוא על כן לא ירחמנו עושהו וגו' (ישעי' כ"ז י"א).