This social habit is more than just ‘zoning out,” since it involves utterly losing touch with one’s sense of personhood for a time, to separate the experience of trauma, attack or anxiety on that personhood, a bit like getting up and leaving a room in which there is an argument going on, only the room is you.
The habit also can be done when one just separates or clamps down on an emotion to the point where it is not felt for now, so that one can deal physically or intellectually with matters at hand. It’s the “I don’t have time to cry” habit, and you might see how much it offers as a survival tool socially when under times of extreme stress or threatened trauma.
It is “burying your head in the sand” so that the social threat at hand, may eventually diminish. Similar to the Biblical quote, “This too, shall pass,” it does more: it is going on a vacation from your experience of self so that you may reemerge with the threat or trauma physically long gone.