Sociologists like to use performance as a metaphor for everyday life. Erving Goffman in particular championed the metaphor, bringing to light how our social interactions take place on various stages according to various scripts. And when people don't follow the right script on the right stage, social punishment ensues (e.g. stigma).
Pierre Bourdieu rather similarly described social interactions as taking place in arenas, seeing them more like games than plays. (Sometimes champs is translated as 'field' rather than arena; it's worth noting Bourdieu intended for it to have a connation of sport/war.) Rather than a script, people get a sense for the rules of the game. And when people don't follow the rules of the game, social punishment ensues.
Whether one is failing at a social game or performance, social punishment can take many forms. For example, sexual harassment is most reported by those who go against gender roles. Powerful women are more likely to be harassed than less powerful women. Women in male-dominated fields are more likely to be harassed. Men who are effeminate, gay, or champions of feminism, are more likely to be harassed. Harassers act to keep people "in their place".
Since not following the script/game is costly for individuals, we're trained from a young age to be on the lookout for cues about what stage/arena we're on and what role we should be playing. Looking for and responding to cues is something we do automatically most of the time. Kahneman would see it as an example of System 1 thinking.
Impostor syndrome is the sense that you're the wrong person to be playing the role you're in. You're acting a role that you've been trained in and hired for -- but your brain is picking up on cues that signal that you're not right for the role.