I’d say it depends on the situation.
As a rule though if the person is not normally like that and it’s out of character for them it means they are possibly stressed out by a situation and they can’t deal with anymore. It’s usually best to take heed and back off and give them the space they need I find.
If they’re like that all the time or frequently though I’d say it’d be more about them than the situation.