In my opinion, some of the other answers here are needlessly harsh, especially if newer players are involved. And there’s not much about how to use the Last Mine of Phandelver module, which offers useful guidance.
While some of this advice is “after the fact” it should provide guidance on how to deal with similar situations in the future.
Giving the party credit
Your party’s plans is not half bad at face value. They rescued the hostage, and are trying to get the drop on their enemies. This plan will let Sildar stay safe in the back of the upper level in that room. So they’re thinking, that’s good.
You let them pull off one ambush, and then got the notion that it was time to move on. That was a good call on your part.
When the party wanted to “rinse and repeat” the ambush plan, they were pushing their luck. Do they really expect the goblins to be that dumb that they come into the room by one’s and two’s until they are all dead?
(Your player with DM experience very well may have been thinking about what he would have cooked up for the party in that situation, and reckoned it was better to move on.)
Violating Exploration as a Pillar of Play
The game is simply most fun when exploration is part of it.
In your case, your party busted into a room and launched a successful attack, then stayed there to “defend” it. That’s about all that room has to offer.
Fighting in the same place over and over is going to start to get repetitive (boring, for some) even if some of the players get a kick out of making the place a “goblin grinder.”
Exploring new areas and having battles in them is part of what makes the game interesting, so definitely nudge the party in that direction. But you still want to find the fun as you do this. That is, don’t murder the party or otherwise punish them too badly.
You may want to mention this to the players, out of session.
Know your (party’s) enemies
When you’re not sure how monsters in a dungeon would react to some unexpected action of the party, you may want to cogitate on the module a little more. Get inside the monsters’ heads. When you do, you can make the adventure come alive more, even when the party plays it straight.
The Cragmaw Hideout
We know a little about the other denizens in this dungeon:
The “dungeon boss,” Klarg, “is filled with delusions of grandeur and views himself as a mighty warlord just beginning his career of conquest. He is not entirely sane… The goblins under his command resent his bullying.”
Then again, Klarg is wiley, and will “hide behind stalagmites while the goblins take cover behind the piles of supplies, hoping to ambush the characters when they enter the cave.”
(LMOP, p. 13)
The goblins in the Twin Pools room built a trap, that they are eager to use. They may devise some plan to draw the party into it.
(LMOP, p. 12)
There are a lot of ways you could go with this information, but note that these are all crafty creatures, not so likely to follow their compatriots into the same trap over and over.
Some more possibilities:
A goblin might guess invaders are present and whisper down the hallway, trying to enlist their help to dispatch the bully, Klarg.
Klarg might shout orders, threats, and insults into the room where the party: “Come out, you filthy maggots, or I’ll crush your heads.” Maybe Klarg knows he’s talking to invaders, maybe he doesn’t.
If you need a moment to think what the monsters might do, take it. Get a drink, or whatever. There’s no need to rush.
In your case, you’ve also got a NPC well-suited to guide the party.
Sildar might suggest the goblins are probably onto the ambush plan and are likely to arrive in force if they come again. (Wise players understand not to ignore the prescient warnings of their adjunct NPC’s — somehow, what they predict uncannily comes to pass!)
Some more things specific to the LMOP:
Sildar can also guide the party towards achieving important goals, like reaching Phandalin, finding Gundren Rockseeker and Iarno Albrek, and/or finding the goblin’s headquarters, Cragmaw Castle.
It wouldn’t hurt for Sildar to mention that his organization is willing to offer significant gold to a party willing to help with these goals.
Sildar may also have noticed the treasure chest in Klarg’s chamber, noting the bugbear might just abscond from the dungeon with it.
It’s also easy enough to let the party get this urge to ambush out of their system by throwing wandering monsters at them.
The wandering monster table, Wilderness Encounters in the Triboar Trail section (LMOP, p. 27) could be used — although you may want to nerf the encouters a bit.
There’s no need to roll the d20 to see if somebody shows up — if the party waits for an encounter, just roll the d12 to see who shows up for dinner.
If a player challenges why there would be random monsters in a goblin cave, you can point out how the guards at the door have been dispatched.
Just make sure the monsters are penniless and have no valuable information for the party (disregard the “bounty” note for the hobgoblins — that particular group doesn’t show up until later).
An ogre, for example, might announce to the party that he just wandered in, and has no treasure or useful information, just a club for smacking heads. The message being: go ahead and have some fun fighting, but this tactic isn’t going to advance the plot.
After every fight, Sildar can make an observation like, “I’m not sure what you’re trying to accomplish here. Isn’t it time we moved on?”
Once the PC’s are sufficiently beat up, they will want to get out of there.
Onward in the module
Later dungeons in this module have reasons why the party should avoid this strategy:
The party should be motiviated to seek the death or capture of the wizard Glasstaff, who may slip away if he discovers trouble.
A hunting band of hobgoblins will return behind the party if they take too long.
Wave Echo Cave
Wave Echo Cave is inhabited by wandering monsters, who will inflict wear and tear on the party without advancing their aims much.