There are people out there who have difficulty working with others. Some of those people feel that this difficulty is because they're so FUCKING SMART and the others are morons who are beneath them. They're extremely difficult to work with in a team environment, but come across as completely confident about their own abilities.
These people are toxic to work with. They drag everyone else in the team down (part of the reason they are productive is that everyone else has to spend time and effort dealing with their bullshit).
Management should spot this and deal with it. But in a lot of situations the "10x" has managed to get into a position where they have a lot of information that the rest of the team doesn't have (deliberately, usually) and getting rid of them would be difficult. And some managers buy into the whole myth as well, and having a toxic "10x" on their team that they have to carefully manage is a point of pride, or something.
This archetype, the lone genius developer who is 10x everyone else, is extremely appealing to some people. Regardless of their actual ability, they start believing that they are this. And worse, behaving like this.
So while, yes, there are some programmers out there who are very productive, the majority of self-proclaimed "10x programmers" you're actually likely to meet are just socially unaware assholes with inflated egos.