Or do they?
It really depends on a number of factors. I've personally run the gamut. I've set up elaborate scenarios, written scene by scene, for all probably eventualities. I've taken notes as I read and adapted pre-fab adventure modules. I've drawn maps and made props... But I've also tried improvising entire sessions, starting play with a single question: "Ok, what do you want to do?" and taking off from there.
Obviously, the prepared approach feels safest, but there's something extremely pleasurable in flying by the seat of your pants, hands free. But it's not for every game.
Game complexity is one factor that should be taken into account. While in some games, it's really easy to stat up an opponent on the fly, others require a steadier balancing act, and perhaps too much diving into rule books to truly support the flow of an improvised session. My best improvised experience was with GURPS, which shows it's possible, but I did either have stats for possible characters on hand, or else pulled books that featured pre-fab characters and used their stats as quick guidelines (you can always stat the character up properly after play).
More important, I think, is the focus of the game. Some games are about PLOT - a dungeon delve, a detective investigation - and these do require some prep if they're to be coherent, even if a real maverick could definitely pull it off. If the focus is principally on character interaction, improvisation becomes easier, particularly so in sedentary games that use a single location and cast of NPCs. When asked what they want to do, the players will have those touchstones to orient them, and the GM will too, building on what has gone before, not exactly inventing a whole world without forethought.
But of course, the GM HAS forethought. A game may be improvised, but the GM's been thinking about the game world all week. As have the players, who are granted additional agency when such an approach is taken. "What do you want to do?" could have any answer, but the group is really building the story together; it's not just the GM's affair.
Ultimately, a mix of the two approaches is probably best. Improvise where you can, but also give the players big set pieces that you did, in fact, prepare. You might spend entire sessions without a road map, interacting with NPCs, building the relationships between PCs, hinting at what might be (prepared) over the horizon. And then there's a proper mission, someone asks for help, and the heroes journey to that dank cave where fate (that's you) has something in store for them.
Point is, when you work without a net, you allow the players and the world to breathe and perhaps INSPIRE the next big thing. And it gives the GM more time (always at a premium, that old commodity) to prepare the bits that NEED preparation. The balancing act between character and plot is usually done over the course of a single session, and guess what, character usually loses out to plot. Play that over the course of several sessions, and you're giving character more of a shot.
Lead to one of my most satisfying gaming experiences and so I render it to you here...
So, what kind of GM are you? Do you thread this particular needle?