in their own minds they haven't, but to directly address your question i think it starts with an offhand quotation in marx about the 'labour aristocracy,' a clade of unionised workers who were able to demand a higher wage than other workers without pushing for generalised wage increases and all-encompassing unions that transcended trade, sector or station. think of how chefs treat dishwashers.
this was latched onto by lenin, a man i used to respect who now strikes me as an opportunistic and thousand faced whore, to spin western workers as, in toto, the 'labour aristocracy' of the world. this imo is the core of the idea that white people can't be 'true proletarians,' the 'settler' theory that contaminated american socialism.
i myself am a genocidal racist, so take what i say about workers' movements and the socialist left with a lot of salt, but that is my opinion on the issue.