No you misunderstand what I'm asking: Why not?
When is a DM allowed to do a thing?
When is a DM not allowed to do a thing?
How have you decided the difference?
Why does a players' agency matter sometimes, but not other times?
Why is a DM allowed to plan ahead? But how come they can't plan so hard?
The OP appears to define Emergent gameplay, as the players doing something that the DM doesn't expect.
Emergent gameplay - as per the OP - doesn't appear to be defined as the players doing what they want. I provided an earlier example of players entering a town for the first time, and declaring that they would head to the tavern. The DM expected this, and has an entire location and maybe a scenario or two for what happens inside said tavern, ready to go. But, it was the players' choice to go there. Nobody said they had to go to the tavern. But that's where the players went, because that's like...Where you go.
If the DM can pre-empt a players' decision, and plan accordingly; What is that? The players still get to make their free choice. The DM just knows what choice they're going to make. Because it's seven sessions in, the DM knows the players, their characters and their party dynamic. There actually is only a finite amount of choices they can make when confronted with certain situations.
In another thread I mentioned that I have a FROST plan for almost any hostile encounter I make. I pre-empt that my players, upon encountering a group of hostiles, will most likely do one of five things, and in the back of my head I can just sort of, wing it because I have the framework to draw upon. The players totally get a choice in what they're going to do. But I've pseudo-planned for what they're going to do, 99% of the time.
If players go to the tavern, they're likely going to want to talk to a patron or two, or maybe the barkeep and/or owner themselves. They're going to want a meal, a room, a rumour around town. They're going to ask for directions. Maybe I'll design a scenario involving a fight - a weapon is drawn, blood is spilled, panic! If I know that the players are going to go to the tavern - because I know they will - then I should probably design the tavern to be interesting, no? Players don't have to make certain choices...But they will. The Wizard doesn't have to search out ingredients for scrolls and spells...But they will. The gunslinger doesn't have to be on the lookout for silver bullets...But they will.
Which is why to me, most 'Emergent' gameplay is basically the equivalent of 'Can I set fire to it?' ...Well no I didn't plan on you burning down the pub for no reason. That certainly is emergent. That sure is something I have to factor now. Emergent gameplay - to me - is effectively 'Irrational gameplay', and that may be one of the reasons why a lot of DMs might stipulate that players can't make Chaotic and/or Evil characters. The amount of 'Emergent' gameplay that a Choatic and/or Evil character can do, is near-infinite, and maybe that's a problem?