The Talmud in Shabbat 11a states that those like R. Shimon Bar Yochai whose occupation is Torah study are exempt from prayer:
דתניא חברים שהיו עוסקין בתורה מפסיקין לק"ש ואין מפסיקין לתפלה א"ר יוחנן לא שנו אלא כגון ר"ש בן יוחי וחביריו שתורתן אומנותן אבל כגון אנו מפסיקין לק"ש ולתפלה
For it was taught: If companions [scholars] are engaged in studying, they must break off for the reading of the shema', but not for prayer. R. Johanan said: This was taught only of such as R. Simeon b. Yohai and his companions, whose study was their profession; but we must break off both for the reading of the shema' and for prayer.
Yet later on 33a we find that R. Shimon Bar Yochai himself stopped studying Torah in order to pray:
אזלו טשו במערתא איתרחיש ניסא איברי להו חרובא ועינא דמיא והוו משלחי מנייהו והוו יתבי עד צוארייהו בחלא כולי יומא גרסי בעידן צלויי לבשו מיכסו ומצלו והדר משלחי מנייהו כי היכי דלא ליבלו
So they went and hid in a cave. A miracle occurred and a carob-tree and a water well were created for them. They would strip their garments and sit up to their necks in sand. The whole day they studied; when it was time for prayers they robed, covered themselves, prayed, and then put off their garments again, so that they should not wear out.
Was R. Shimon Bar Yochai not included in the category of "R. Shimon Bar Yochai and his companions"? Or was he praying even though he was actually exempt? Is there some other reconciliation of these two passages?