In Game Masters Aren't Gods... They're Genies, Neal Litherland argues that the job of a GM (and it's telling that he calls it a job) is "to create challenges ... decide what treasure the players find, what allies they make, and ... do all these things in service to the players." He sees the game as being akin to a book that the players will want to keep reading. In a related discussion on Discord he made it even plainer, casting the GM in the role of a performer and other players as the audience.
There are a couple of big assumptions at play here and I disagree with both of them.