So in the case of a Bard persuading a King, the DM's job is to, as fairly as possible, assess the likelihood of success. And that involves knowing their NPCs, what their motivations and personality and foibles are like, to determine that possibility. In other words, the DM is roleplaying the NPC. It is roleplaying when they say, "No, sorry, there's no way you're going to persuade him of that." It is roleplaying when they say, "Yes! The King jumps to his feet and agrees!" And it is still roleplaying when they say, "Hmm...that's tricky. Let me see a Charisma roll; you can use either Deception or Persuasion, depending on how you want to play it. 18 or higher and he'll agree."
Again, the Bard didn't do anything to the NPC. The Bard just did something, with the objective of getting the NPC to do something, and the DM determined how the NPC responded to that something.