Rebbi Akiva’s students represented the continuation of the Torah after the churban. Since they were not fully qualified because of their behavior, the Torah transmitted through them to all future generations would have been imperfect. This is why they passed away prior to the holiday of Matan Torah.
The connection between the joy of Tu B’Av (when the people of the midbar stopped dying) and that of Lag BaOmer (when the students of Rebbe Akiva stopped dying). They both signified the end of an era marked by a manifestation of Hashem’s anger.
Why did Rebbi Shimon bar Yochai specifically pass away on Lag BaOmer?
Recorded at OU Israel’s L’Ayla Rosh Chodesh Iyyar 5779 Women’s Event sponsored in memory of Mrs Linda Pruwer-Brachfeld, מרת חיה סאשא בת ר’ יוסף הלל.