"Three times in the year" (Exodus 34:23) - the word "times" means nothing other than appointed seasons. "Shall all your males be seen" (Exodus 34:23) - this comes to include the small child. From here they said: every small child who is able to grasp his father's hand and go up from Jerusalem to the Temple Mount, his father is obligated to bring him up. "Before the Lord, the LORD" (Exodus 34:23) - "I am Lord over all who come into the world." One might think that you too are like the rest of them; therefore Scripture teaches "the God of Israel" (cf. Exodus 34:23). One might think He is your God alone; therefore Scripture teaches "before the Lord, the LORD." How can both be so? I am God over all who come into the world, yet My Name rests upon you in particular.
Three Times a Year Even the Small Child Goes Up
Mekhilta DeRabbi Shimon Ben Yochai 34:12
שלש פעמים בשנה אין פעמים אלא זמנים: יראה כל זכורך. לרבות את הקטן מכאן אמרו כל קטן שיכול לאחוז בידו של אביו ולעלות מירושלים להר הבית אביו חייב להעלותו: את פני האדון ה'. אדון אני על כל באי העולם יכול אף אתה כיוצא בהן ת"ל אלהי ישראל יכול עליך בלבד ת"ל את פני האדון ה' הא כיצד אלוה אני על כל באי העולם ושמי יחול עליך: