It says in the Parasha of Aharei Moth, "With this (Be"Zoth" ) Aaron shall enter the sanctuary". This can be explained that in the merit of the Torah which is called "Zoth", Aharon Hakkohen (Aaron) was able to enter the Sanctuary. The word "Bezoth" has the numerical equivalent of 410 which comes to inform us that the first Temple would stand for 410 years and the Kohanim (who were the descendants of Aaron) would enter the sanctuary during that time.
If not for the merit of the Torah that they studied, the Temple would not have stood that long. Seven Bathei Dinim (High Courts) performed idolatry, yet G-d did not destroy the Temple. Once they stopped studying Torah, however, the Temple was destroyed. G-d was prepared to forgo the judgement for the idolatry but was not willing to overlook the lack of Torah study.
This explains why Ribbi Hananya Ben Teradyon says in Pirqei Aboth (Ethics of the Father), when two people sit together and speak words of Torah, the Shekhinah (G-d's holy Presence) rests between them.
(Alshikh on the Torah, Ahareim Moth, 16: 3, Aboth 3: 3)