If I can't stay calm and think rapidly under mild social pressure without threat of bodily harm or lost lives, I personally wouldn't feel honest in telling my teammates, "yes, if you or I are in a situation with risk to life or limb, you should trust that I'll handle it appropriately and protect myself and/or you."
Our assumptions about who will succeed in the most difficult situations don't seem to hold up.
My own experience in tall ships and shipyards, where there are plenty of life and death decisions is not that.
There are people that I can fluster easily in a social situation that are perfectly calm and capable in high pressure dangerous situations. There are people that are practically insult comedians that I wouldn’t want driving a car in the same parking lot.
What actually seems to be the common factor is male groups in informal settings
I work in that industry and can say with confidence that statement is false.
Which is a good thing really, because I wouldn't want to think that people were actually determining fitness to be trusted with a soldering iron or embedded systems design based on their witty comebacks or tolerance for jokes about their wife.
Two things can be true at the same time: that this type of banter has undesirable consequences as well as desirable ones. This type of nuance is generally the sort of thing that's worth trying to understand before you try to 'fix' it.
I completely agree with you about the purpose and value of banter- but do you actually know any women or interact with any on a regular basis?
It's simply not true- women banter with each other just as much as men do, and they especially banter with men they are interested in romantically- for the exact reason you mention - to see if they handle stressful situations well, which is a desirable (attractive) trait in a romantic partner.
I'll admit women tend to be more subtle with this then men- such that some people (especially the ones who are failing the test) will mistake it as complaining or arguing.
I enjoy it very much when my wife does this- I usually respond by turning it into some kind of joke, or turning it back on her in a way she doesn't expect, and I can see her light up with joy that I 'got it' and didn't respond with frustration/etc.
That is the point of the banter: to see how you handle stressful situations.
Women don't understand this, but nearly all men do.
Why? For every accident, there are around twenty near misses. For every near miss there are several situations that could have gone bad very quickly unless the person on the spot remains calm and acts rationally.
It is essential to know how you behave under stress in most blue collar work. They're not being assholes for fun; they're doing it to save lives.