Don't worry about it, everyone has their own reason for being how they behave. The best way to understand and relieve stress is to size up the situation, detach yourself from the equation and inquire directly (hey, are you alright?) Or indirectly (looking for an answer without approaching them about it).
Do this often enough and I'm sure you will find the to instigator to be an earlier victim more than half of the time.
Even if you don't find out you can assume it didn't come out if nowhere to ruin your day, you are in control of your environment.