This kind of surprise is not "Fancy meeting you here! Hang on while I unsheath my sword". Surprise in a dungeon is a boogeyman, leaping out of the shadows and ripping out your liver before you can scream.
As a game mechanism, Surprise is actually more complex and more interesting in OD&D than in later editions. Unfortunately, the rules for it are kinda scattered across a few pages, mostly in Underworld & Wilderness Adventures, and some of the details are often missed or misunderstood as a result.
Let's look at how it works in sequence starting with this from U&WA p9:
"A Condition of surprise can only exist when one or both parties are unaware of the presence of the other."
In other words, you, with your torches shedding a dim halo of light, didn't know that thing was there, and then....
"...roll a six-sided die for each party concerned. A roll of 1 or 2 indicates the party is surprised. Distance is then 10 - 30 feet."
Surprise in the dungeon occurs very close by and whoever is surprised, is about to have the bejesus scared out of them. So much so that....
"There is a 25% chance that any character surprised by a monster will drop some item. If he does, roll for the possibilities remembering that only those items held could be so dropped." (U&WA, p12)
Surprise is a "jump out and say BOO!" rule. It could almost be called the "Startled" rule, except that the term "surprise" is really to be understood in a wargaming sense as "element of surprise". Nevertheless, because one side is startled, it automatically becomes the surprising sides turn to move. "Surprise gives the advantage of a free move segment, whether to flee, cast a spell or engage in combat." (U&WA 9)
As a wargaming convention, surprise will most often unfold as a deliberate, if perhaps impromptu, ambush. TSR's Warriors of Mars, by Gygax and Blume, published only a matter of months after D&D in 1974, defined surprise as "If one figure surprises the other (ambush, flank attack, rear attack, etc.) it strikes first. (p17)
When it is monsters doing the surprising, as it usually will be, what happens next depends on the exact distance and the intelligence of the monster or the decisions of the Player Characters in the instance when they are the ones doing the surprising.
"If monsters gain surprise they will either close the distance
between themselves and the character(s) (unless they are intelligent and their prey is obviously too strong to attack) or attack."
The first sentence undeniably says monsters will either close the distance or attack. The parenthetical phrase qualifies the action of "closing the distance" to say that intelligent monsters won't do this in cases where they fear the party is "too strong to attack". It follows deductively that non-intelligent monsters will close the distance or attack. It also follows that the whole purpose of non intelligent monsters "clos(ing) the distance" is to attack, because they are too stupid to know better, unlike the intelligent monsters.
Read carefully, that sentences gives three general alternatives:
1) Intelligent monsters faced with difficult opponents will not close the distance between them and the PC's
2) Non-intelligent or clearly stronger monsters will "close the distance...to attack.
3) "or attack" if they are already close enough to do so.
Okay, so for option 1, the intelligent monster who senses a difficult opponent, the next step is:
"...the more intelligent monsters will act randomly according to the results of the score rolled on two (six-sided) dice: 2 - 5 negative reaction; 6 - 8 uncertain reaction; 9 - 12 positive reaction" (U&WA 12)
Based on the intelligent monster's reaction, the referee must then decide if the monster avoids the encounter altogether (stays hidden or moves away silently) or decides to make their presence known in some way other than an immediate charge. Note that a negative reaction might prompt a monster to attack with a distance weapon, but not rush in to melee.
The non intelligent or bigger and badder surprisor now has the first move, but if a monster has to "close the distance...to attack... or attack", then clearly the whole 10 to 30 feet surprise distance doesn't mean automatic first strike attack, but some subset of it does. That subset is given to us on page 12 as:
"There is no chance for avoiding if the monster has surprised the adventurers and is with in 20 feet, unless the monster itself has been surprised."
This tells us clearly that a monster won't need to close any distance if they surprise within 20 feet, they can simply attack. Ergo the only time a monster would need to close the distance is if the surprise occurred at 20 to 30 feet. So then at a distance of 10-19 feet the surprising monster can simply roll an attack roll on the startled characters (and in 3lbb D&D, a second attack roll would immediately follow since attackers have the initiative in every round). If the Player Characters are lucky enough to have been surprised at 20-30 feet the monster will have to use it's surprise segment/free move to close the distance to attack.
So what happens for the surprised party at the 20-30 feet distance?
That depends on the game you are playing. If it is 3lbb's + Greyhawk, then presumably you are using d6 initiative checks as introduced in the D&D FAQ in Strategic Review Vol. 1, No. 2. (Summer 1975). Therein Gygax gives us an example of surprise at the further distance: "10 ORCS surprise a lone Hero wandering lost in the dungeons, but the die check reveals they are 30’ distant at the time of surprise, so they use their initiative to close to melee distance."
Here Gygax refers to the free move segment as "their initiative" a new term unknown to the 3lbb's. Because the Hero is more than 20 feet away, the orcs must use their free move to close to "melee distance" which here means the melee contact zone/area of control of 10 feet.
Next round an initiative roll comes into play:
"lnitiative is now checked. The Hero scores a 3, plus 1 for his high dexterity, so it is counted 4. The Orcs score 6, and even a minus 1 for their lack of dexterity (optional) still allows them first attack."
Closing the distance, requires the use of the surprise initiative to use Gygax term, and allows the possibility that the one surprised could "avoid" the encounter - clearly they get a chance to take an action, although the Hero in this example didn't get that chance because he lost the initiative roll.
So at 20'-30' an initiative check is made and that gives a bare chance to the poor startled Hero in this case to possibly regain initiative.
However, in 3lbb only D&D there was no "initiative check". The surprised party automatically had a chance to move.
In either case, it is clear that when an attacker gains surprise but must close the gap to melee, the surprised party has a chance to "avoid".
That means those surprised at a distance of 20'-30' can try to do something like cast a spell, throw a bag of donuts, or RUN. (U&WA p12)
Running when surprised puts the runners at a significant disadvantage however because the aggressor gets that free move segment to close the gap. This means the surprisor adds two moves minus the 3" gap to get the full distance they can travel. For example, a character with a movement rate of 12" can normally outrun a monster with a movement rate of 9", but if that same character is surprised by the monster at a distance of 20'-30', then the pursuing monster will have an initial movement rate of 15" (9 + 9 - 3) and the runner will be caught unless something occurs to prevent it.
I'll just note here that surprise in the Wilderness functions similarly in this respect, except that the automatic strike range is 10 yards (30 feet) instead of 10-19 feet (U&WA 17).
So there you have it. Surprise in the dungeon always causes a check to see if those being surprised were so startled that they accidentally dropped something in hand, and it always grants the surprisor the first chance to act, but if the one being surprised is just a little out of reach, at 20-30 feet distant, then an opportunity to avoid exists.
Now the question immediately arises regarding Melee Range. Because they are all within 30 feet, (3") aren't any surprised characters already to close to avoid an attack? The short answer is no, because Melee Range only concerns existing melees and the area in which an existing melee is occurring. (explaining all that would take a whole other post).