Q. There was a gezeira to kill Rebbe Shimon; there was no gezeira against his son Rebbe Elazar. So why did Rebe Elazar go into hiding with his father?
A. Vaani Tefila (2: Matan Torah, quoted in Kaftor Voferach) asks this question and answers that based on the story told by the Talmud (Shabbos 33b) Rashbi and his son Rabi Elazar were chavrusos and would constantly learn together even before they escaped to the cave. So Rabi Elazar was ready to suffer incredibly and to sacrifice all, if only able to continue learning from his great father.
Besides, one must add, that it would certainly be proper and correct for the son to follow his father to the cave and not to abandon him, but assist him during such a critical time.
Moreover, the Talmud narrates that they both were afraid that the Romans may torture Rashbi’s wife to divulge were he was hiding. If Rabi Elazar stayed behind, they likely would do the same to him or execute him for his father’s sin.
Most important, they both reached together incredible and historical spiritual heights, and when they exited the cave wherever the son created hurt, his father would heal. Rashbi told his son: “The world would suffice and be fulfilled with just the two of us.”
Rabbi A. Bartfeld as advised by Horav Shlomo Miller Shlit’a