Many authors have said something to the effect that as they get deeper into a novel, the story starts "writing itself." Characters will do things that were unplanned and unexpected, and ideas just come seemingly out of nowhere.
Now a DM, while ultimately the arbiter of the game world and everything within it, is only the partial author of the fiction. They cannot control what the PCs do, though they can--if they want--control the outcome, or at least guide it in a certain direction.
I can only speak for myself, but I'm guessing that most DMs approach the fiction in a similar fashion as the novelists mentioned above, yet even more collaborative with the "unplanned and unexpected" due to the presence of the players and their actions that impact the fiction.
Or to put it another way, the DM is the game world - they decide what exists within it, and also--to a large extent--what and who the PCs interact with. But they aren't the fiction, not alone. The fiction is a co-creation of the DM's world (and choices) and player actions.
EDIT: I think the word "override" is a bit distracting and inaccurate the dynamics in most games, because it implies a conflict that doesn't really exist - at least in the vast majority of cases. The inherent nature of RPG fiction is collaborative, so nothing is "overriden." A DM might start the players on a certain course and have a basic outline of how it might unfold, but the vast majority don't hold rigidly to it. Maybe in moments, but most DMs "flow with" the collaboration. IME, at least.