We can think up scenarios to justify all training, but the truth is it's far fetched. With your scenario as a civilian in the US, I would be required to retreat from the situation. If I were to send my dog after the man before he had a weapon, and the dog were to maul him, I would surely be sued, go to jail, and the dog destroyed. This assuming the police got involved after. Worth it if the man really was going for a gun and the alternative was me getting shot and killed. But who can say what would've happened. You'd have to be one cool customer to make a correct call to send your dog in such a situation. If you feel you're likely to be in such a situation, you should probably be carrying a firearm yourself. It's true that sometimes the best defense is offense. But as members of this society we are simply not allowed the luxury of acting preemptively.
That said it's a fun training exercise for handler and dog. If the dog is clear headed enough that it will not one day decide to do it on his own when he sees a man running, then train it. I think there are more chances for this to be used in a home search, and the dog biting someone in the home would be viewed as more justifiable. I think it's better to leave a dog in the home that would deter anyone from entering in the first place.