An incident from the Sīrah
Jābir b. Abdillah (r) narrates: "We were on an expedition with the Prophet ﷺ and he sent me on an errand. When I completed it, I returned and approached him on his camel, and said salām, but he didn't reply. I said to myself, 'Perhaps he is irritated with me that I took too long?' So I repeated the salām, and he still didn't reply! And thoughts even more terrifying came to me!! Then, after a while I returned and said salām for a third time, which he did reply, and then he explained, 'I didn't respond to you earlier because I was praying.' And at the time, he was riding on his camel, not facing the qiblah." [Reported by al-Bukhārī and others].