Imam Hasan al-Askari was the last Imam whom the followers of Ahlulbayt could meet. He knew that his followers wouldn’t be able to see their Imam for centuries after his demise.
Thus, in his last moments, he gave advice guiding future generations to become better followers while introducing his son, the final Hujjah of Allah, to the world.