On this point right here I have to suggest maybe you try DMing a bit. If you think there's a case where a DM isn't having to invent or think on the fly, you will be surprised. Even a rigid DM running a programmed module with loads of preset "read this" text likely has moments where he has to pull something out of the ether when the players deviate from the script. By definition, the DM, especially if they are both good at and enjoy being a DM, will have to invent something whole cloth to account for unexpected player direction (unless they are a railroad DM and have removed player agency). The goal of the DM is to make it feel like it was organic, and then note it down as it is now an official part of the game/world.
Don't confuse "I wrote this yesterday in prep," as somehow being more creative than "I wrote this down in response to your clever engagement with my module." The latter is actually where all the best stuff you have experienced came from if the DM knows what he is doing, and you never realized it.
Now that said: a DM who goes in with zero prep and no vision is just asking for trouble, so on that point I agree. But there's a very wide swathe of DM style between "I started reading the book five minutes ago and am just making stuff up," and "I have a vision and a plot but the players went left when I prepared for the path to the right, and I would like to continue gaming for a couple more hours instead of calling it tonight so I'll draw from other resources to build out that direction on the fly."