60. Nearness to God and End of Life
The Rambam cites unnamed philosophers who explained that a person cannot perfect himself spiritually in his youth because the young are too heavily controlled by their passions. One whose passions are hot cannot achieve the purity of thought necessary to acquire an intense love of God. [III, 51] As a person grows older, his lusts diminish and his intellectual capacity increases. In advanced age, a person's knowledge increases and he can rejoice in that knowledge. It is in this joyful condition that his soul departs.
This joyful condition is the state in which Moshe, Aharon and Miriam found themselves at the times of their passings. Regarding Moshe and Aharon, the Torah tells us that they expired through a Divine "kiss" (Deuteronomy 34:5 and Numbers 33:38, respectively). The Sages explain that Miriam likewise passed away in this manner but that the Torah always speaks more discreetly when discussing women (Baba Basra 17a). This Divine kiss, the Rambam explains, refers to the joy one derives from his knowledge of and love for God. The Sages apply Shir HaShirim 1:2 to the concept: "Let Him kiss me with the kisses of His mouth."
The kind of death experienced by Moshe, Aharon and Miriam is in actuality a deliverance from death. It was unique to them and the rest of us cannot hope to aspire to that exceptional level. Nevertheless, a person's connection to God mitigates his passing to the degree he has achieved, as per Isaiah 43:8, "Your righteousness will go ahead of you; the glory of God will be your reward." To that end, the Rambam urges the reader to spend more time trying to get close to God and less time in other activities.