The question: the mitzvot of Hakhel and of writing a Torah scroll were said only close to Moses' passing, at the end of the Torah. Why there?
The explanation:
- In the plain meaning: Hakhel is part of Moses' charge to Joshua before entering the Land. It is a communal mitzvah that depends on the king — so it was not said together with Shemitah, which is a mitzvah of each individual.
- In halachah: according to the Rambam, the purpose of Hakhel is to awaken awe and acceptance of the yoke. And writing a Torah scroll is mainly for study (as the Rosh writes). The two foundations of the Giving of the Torah — accepting the mitzvot and study — are divided between the two mitzvot.
- The Sinai experience: the Giving of the Torah was through seeing, not only hearing, so it was engraved deeply in the heart. But over the years the impression weakens — so the event must be renewed from time to time. Hakhel, and the writing of a Torah scroll by each person, renew the acceptance at Mount Sinai.
In practice
Everyone can make a "Hakhel" of his own: gather the people connected to him — family, women and children, friends — for Torah study and strengthening in keeping the mitzvot. That is how the Sinai experience is renewed today too, and the Redemption brought closer.