Finding a balance between game mechanics and creative thinking can be difficult for a DM. As noted, players can sometimes derail a storyline by thinking of something the DM wasn't prepared for, thus creating a whole new direction for the party to go. The recommendation is that the DM explore this new direction and open the campaign to new possibilities instead of saying, "No, you can't", "No, there isn't", or "No, that's not possible". The DM's Guide provides the example of player's seeking information about a possible wizard's guild in the search for a lich, recommeding that the DM allow this venue of exploration and information gathering rather than slamming the door shut to it. But what about times when players come up with combat tactics that, while they may be considered "unorthodox", are well within the limits of the rules?
The reality is that players can sometimes use an ability or power in a way that can singlehandedly change an encounter from "challenging" to "cakewalk". The question, then, is, "Does this make the entire game too boring or 'underwhelming'? Should the DM alter, bend, or even break the rules to counteract the player's creative thinking?" Some may say that a good D&D campaign needs to constantly keep the players on the fringes of anxiety by constantly applying pressure, forcing them to wonder how their characters are going to get through the encounter and survive to the next one, and that simply allowing them to overrun the enemies in a given encounter is too boring and gives the characters a "free ride" to higher levels. While every encounter should not be a walk in the park, an occasional smack down by the PCs is certainly not out of line. In fact, it is probably necessary!
D&D is a game of fantasy, adventure, and heroism, and players often expect to feel as if their characters are heroic and unique every once in a while, if only for a moment. At the same time, DMs don't need to feel as though they're just throwing fodder into an ego machine! This is a dark path that leads to some DMs becoming embittered and saying "No!" to everything. At this point, the game loses its luster and the players begin to think in terms of "Will the DM even allow me to try this" instead of "I wonder if my character can pull off this crazy stunt that just might get me/the party out of a jam!" It may even lead to DMs abusing their role to bend the rules or even to rationalize why the rules don't even apply in a given situation when they most certainly should.
For example, if a character who has tried to fight bravely (and maybe a little too boldly) gets himself between a rock and a hard place and tries to use invisibility to avoid opportunity attacks while he repositions himself, the DM might rationalize that the character shouldn't have gotten himself in this predicament in the first place or that the encounter will be too easy for the party if the character can move into a more desireable position and thus rule that the enemy can still make an opportunity attack against the invisible character because that enemy can "smell" him, even though the rules clearly state that creatures cannot make opportunity attacks against targets they cannot see (PHB 281, 290). In this scenario, the DM has effectively removed one of the PC's abilities, making him more like the average peasant back at the village and less like the adventuring hero he is supposed to be!
Another example might be that a player might use an action point to make an additional ranged attack while adjacent to an enemy, knowing that the enemy cannot make a second opportunity attack against him, but the DM simply rules that the enemy can make another attack because he wants to punish the player for "exploiting" the rules. Again, the thinking behind such a rationalization is "No, you (the player) can't do that!"
The examples can go on and on, but the point is made. A DM is not there to make the PCs feel like they really can't do much of anything except stand in one place and use at- wills or basic attacks until everything is dead (How fun would it be for the DM if the party repeatedly stayed in the doorway or in the hallway every encounter to bottleneck all the enemies so they can't maneuver or flank?). Every combat encounter shouldn't feel to the players like a cookie cutter grind of the same actions over and over. In fact, instead of saying "No" when a player tries a new strategy or tries to use a power in a new way, the DM should be looking for ways to say "Yes!" and should encourage players to exercise creative thinking as long as it is within the rules, no matter how "bizarre" or "unorthodox" their ideas may be. Therein lies the secret to why this game is so fun: we get away from our everyday grind of school or work and get to do extraordinary things (albeit in our minds)! We get to step away from the ordinary and mundane and get to perform herioc feats! If the DM develops a habit of saying "No" to everything, then we are dangerously close to recreating real life (or worse) at the gaming table.