The example was public speaking. Many people get very anxious if they need to do that. But if they think about it rationally they realize there is no real danger there. That's how they know it is an irrational fear, and they can use the breathing technique to make it managable.
So maybe it's more about if you know you should not or can not run away from a fearful sitution you should take a deep breath. Whereas if you are on a dark street alone and a group of hooligans look like they might attack you then feel fear and instead of breathing deep, you should run.