Which works if the offending player is the one punished. Typically, the character who dies is one less optimized to handle combat.
From my experiences, it's the rest of the table who suffers the consequences. They're the ones irritated when their diplomatic overtures cut short when the bored power gamer says "screw this, I draw my sword."
Meeting that NPC is a scene. It's a moment or random roleplaying, like interacting with a merchant or traveller on the road. It doesn't advance the plot, but it's a shot in the montage denoting the passage of time.
That fight where you kill the NPC with your well executed and optimized attack is boring. It's boring and forgettable. (Like most fights that go exactly like plan.) That moment where the rogue sneaks back to the toll bridge and pickpockets their money back replacing the purse with a pouch of live scorpions… that's a moment that will be retold and laughed at for years.
The catch being, the power gamer who just wants to win and thinks beating combat is the way to do so isn't going to care about the other aspects of the game. They're going to make that primary, whether the DM wants to or not.
But even if the power gamer IS one of the few that is also a solid roleplaying and cares about more than survival, there's still the disruptive influence of them owning combat.
It's not fun for the other people at the table if everything is dead before they get a turn. It's not fun to be the sidekick.
And from a DM perspective, an optimizer makes it hard to balance encounters. The difficulty needs to be increased to accommodate that one player, which can be unfair on the rest of the table as well, making it even harder for them to contribute or vulnerable to being squished.
After all, if the DM was giving just one player super cool magic items that made them better than everyone else, we'd be tripping over ourselves to call that unfair behaviour. But when someone does it themselves through careful reading the the rulebooks, that's okay?
Hmmm... ok so let me give you my perspectives here...
the bold part... Where is it said that the NPC does not advance the plot? matter of fact, the PCs decision to interact may well not only advance the plot but create a plot. Suppose a PC decides to support this crossing? What if they partner with this guy, getting better facilities for safer crossing, building up repair, rest stops etc? there is a lot of plot and story that can be **created** by the interaction with this PC or another PC that can last a lot longer than another time the thief snuck back and stole something and poisoned someone. (The story of the scorpion would not be so much a great campaign story if the rogue did these things all the time after all - it would just be "last tuesday.")
the key thing i was trying to get across is that the more the Gm lets interactions grow and the more they let interactions play a role, the less likely the "kill npc on sight" or whatever you want to call it approach is seen as a "winning one." it is "winning" only in the absence of something better.
As for the italicized...
first - once you apply presumption of an almost mindless blind obsession to a player type - the argument loses any significance at all. What about the roleplayer who only ever thinks of the romance angles and never even tries to take up any combat skills? What about the rogue who only ever wants to steal and never fights and so does not adventure with the... etc etc etc boring boring boring extremist dichotomies.
if one assumes a player who has the ability to act rationally and make rational decisions, then you get to more interesting fodder for discussion.
"It's not fun for the other people at the table if everything is dead before they get a turn. " that is a sign of a GM problem, not a player problem. the Gm creates and devises the adversaries and challenges and if he puts "fights" that are over that quickly often enough in play to be a problem for the enjoyment of others he needs to rethink his design and approach. i won't say i have never seen a one shot kill, because obviously it has happened but it was not as much a case of awesome powergamer fu as a lucky hit and a very weak adversary that was not intended to be a challenge anyway.
Again that seems to be taking the subject to some extreme well beyond what is seen in most play. 905 of the game is played between the upper 5% extreme and the lower 5% extreme.
As for having one or more optimizers making it harder for the Gm to balance encounters - not in my experience. I have never found it to be that case that i did not have to put some work into balancing encounters and challenges - again - i see balance in play as the intersection of capability and need (key and lock) and so i factor in the character's capabilities most all the time. it is not harder when one does better at this and another better at that even if "that" is not at play, not highlighted" in a given scene. last session a character's ability to do radiant attacks and resist necrotic damage was one of the YUGE things of the fight and as they figured it out the PCs adjusted their tactics to take advantage of that. . The fight a few weeks ago, that character did not fare so well at all.
Increasing the challenge can easily be done in ways that give characters more opportunities, not just squish them. As a matter of fact, the more complicated an encounter is the more likely it is that no one character can dominate it. An encounter with opportunities for sneak, support, slash, snipe and spell (not to mention speak, save or snuggle) is unlikely to have it be possible for just one character to take over and shut the others out if the others want to contribute.
As for your linkage of player performance vs GM favoritism... a GM intentionally and consistently giving one player more/better/cooler rewards than the others to the detriment of the game experience for the others that would be unfair **regardless** of whether or not it made them better in combat. its not that the rewards made them better but that the Gm was not treating each player as equally as they expect. it wouldn't be Ok if the "supper cool more than you" was all cash and titles and interactions.
That has nothing at all to do with what the players themselves choose to do with their options as given and the benefits they reap. there is no promise of "equal outcomes" implied anywhere by a GM - though there is a strong goal of equality of opportunities. Again that notion of balance being capability-meet-challenge applies just as well to capability-meets-opportunity. Gm hopefully runs a game where the choices and capabilities the PCs have get "equal enough" opportunities and challenges so that everyone feels engaged and useful. its not particularly hard if the Gm pays attention at chargen and backstory and just simply keeps at it.
on the other hand, if a Gm runs a game where any one aspect if really over-emphasized then balance can be more of a problem if some of the characters are well suited to that and others are not. A campaign which features lots and lots and lots of undead will likely shift the perceived balance" between cleric and druid quite a bit **unless* the Gm is paying attention.
lots of factors play into balance and its not hard for a Gm to keep it going well enough, but they will need to do it.