In the Torah, the future site of the Beis Hamikdash is identified as “the place that Hashem will choose”.
The Torah specifies that it must take place “when the Jewish people come to appear in the place that Hashem will choose”. Hakhel had to take place in the courtyard of the Beis Hamikdash.
The commentaries suggest a number of reasons why the Beis Hamikdash was integral to the Mitzvah of Hakhel and its objective.
In the Beis Hamkidash, Hashem’s presence was openly revealed, just as it was at the Giving of the Torah at Har Sinai, which Hakhel serves to recreate. It also casts a sense of deep awe of Hashem, which is one of the objectives of Hakhel.
In another connection, Rashi writes that the Sefer Torah that was used by the king for the Hakhel reading, was the Sefer HaAzarah. This refers to the Sefer Torah that was written by Moshe Rabbeinu that was kept in the Aron as taught in our Parsha ונתת אל הארון את העדות