I think there may be a bit of confusion here between "encirclement" and "envelopment" - or a pincer movement. Think of an encirclement being a possible outcome of a double envelopment, with a single envelopment being the flanking of one wing of an enemy army. It is also not clear that the result of encirclement caused Roman soldiers to panic and attempt to run away; rather they were packed like sardines.
Cannae did not begin as an encirclement, but rather as a double envelopment. The Battle of Tannenberg in WW1 is a similar, modern example.
At Cannae, the Romans attacked the Carthaginian center. In Robert L. O'Connell's "The Ghosts of Cannae" he explains that it was actually the Romans' offensive strategy to attack in column and penetrate the Carthaginian line - so they may not have exactly needed luring, but it could be argued that they were given a false impression of early success by their forward movement after contact with the enemy. O'Connell writes "Geometrically this called for a narrow, thick formation", and Polybius describes the Roman formation "placing the maniples closer together than was formerly the usage and making the depth of each many times exceed its front". O'Connell again writes "Long, narrow columns are easier to keep together, and, they therefore move faster and more cohesively on the battlefield. The many lines to the rear also insured an almost inexhaustible supply of fresh fighters to take the place of the fallen and exhausted, a kind of conveyor belt of shark's teeth". He goes on to argue that many of the Romans present were inexperienced, and so close a formation would have allowed them to feel more confident and protected. So the Romans deployed with the intent to go forward, and planned for a potentially long fight - but did not count on the enemy actually acting against them on their flanks.
I had written that the details of the fight in the center were disputed - O'Connell notes that Hannibal seems to have deployed his Libyan infantry in column on the flanks, with the Gauls and Iberians fighting in the center (they would have the responsibility of executing a fighting retreat to pull the Romans in). He has us envisage this as a backwards letter C (or like this "I^I" if viewed from behind the Carthaginian lines, with the "^" turning the other way and moving backward as the battle went on). So it is really the case that the Libyans remained in place until the Romans advanced far enough to double envelop themselves, at which point the ends of the Libyan columns moved forward and sealed the Romans in while the center stopped. So the Romans mostly trapped themselves, although the Gauls and Iberians did advance at first, in a crescent shape. However - and this is what I remember as being a bit of historical guesswork - Polybius claims that the Gauls and Iberians really were forced to retreat for real, and it was not an executed maneuver. But whatever the case, the meat of the Carthaginian casualties were Gallic. The "core" of Hannibals' army was North African and Iberian, so I have read into this as Hannibal having little problem with allowing the Gauls to do the majority of the dying (and the Gauls may have been happy to do it so long as they got to kill some Romans).
So, the Romans pushed the Carthaginian center inward and the Gauls/Iberians collapsed and began to retreat, whether intentional or not. As the Carthaginian center moved back, the Romans were given the impression that they were succeeding - in reality, they were ensuring that the enemy could flank them on both sides.
Then, the Carthaginian center, which had appeared in retreat, refused to budge (this may have been because [I had said veteran, this would actually be the position occupied by the North African light infantry after they had skirmished) light infantry had remained at the stopping point, and blocked the retreat of the Carthaginian center which had been in contact with the Romans, to prevent an actual rout being caused by panicked soldiers running through their ranks [I can't source this, so take it with a grain of salt, but I remember reading an account concerning the stopping of the Gallic/Iberian retreat]. As the battle progressed, the Romans were attacked from behind by cavalry, and the Carthaginian wings attacked forward, turning the pincer into a full circle. O'Connell notes that it may have been the case that the rear of the Roman formation was no longer occupied by the Triarii, who could have dealt with cavalry charges, but by the lightly armed Velites (skirmishers) who had retreated behind the Roman lines.
On a macro scale, being enveloped on both sides means that there is no front line for you, as the victim. If you move forward toward the enemy center, both your friendly flanks encounter enemies adjacent to them as well as in front. To a general, this also means your flanks are being threatened - those enemy soldiers adjacent to your men are at risk of actually moving behind them. In reality a full encirclement is risky for the attackers as well, because enemy reserves or a cavalry force could attack your thin/exposed encircling force.
Now the vital thing to note about Cannae in particular, or any ancient battle, is that men need room to swing a sword and deploy a shield. If you put your arms out in a T-pose, this is about what Roman doctrine declared necessary for a soldier to function. While the double envelopment was bad enough, the Carthaginian wings were able to fold in behind them and fully encircle them.
As the Carthaginian wings folded in and encircled the Romans, the Romans were pressed in against one another. The men at the edge of the encircled force do not have room to properly defend themselves or attack. The men behind them on the inside of that encircled force are also squished, and as you go further back may be unable to even see the enemy at all until it is nearly their turn.
Importantly at Cannae, the Carthaginian cavalry defeated the Roman cavalry first - this was key in ensuring the Carthaginians could safely execute their maneuver. The victorious Carthaginian cavalry actually turned and attacked the Roman rear, causing the Romans to form up more solidly and drive further into the Carthaginian center.
Although the Romans had deployed a gargantuan force [Livy states it was only 10,000 men overstrength, Polybius claims it was the size of eight legions rather than the usual four, or about 90,000 men. If the force were Livy's, the Roman Army at Cannae would have deployed at a strength of at least four legions, maybe five, at around 40-50 thousand], they had lost the initiative and were forced to blindly react as events unfolded. Their numbers advantage was lost because the Carthaginians limited their frontage as they enveloped them, and their advantage as heavily armed and armoured infantry was also negated by being compressed into such a small area.
It took the Carthaginians the entire afternoon to destroy the encircled Romans. In some sense this is the trouble with encirclement - the enemy can't run away, and is forced to fight to the death. Traditionally this is a bad idea, because you want the enemy to rout - many ancient and medieval battles saw the most casualties occur during pursuit of a retreating army - light cavalry was especially adept at this kind of pursuit.
But it should also be noted that about 10,000 Romans actually fought their way out of the encirclement at Cannae and escaped. Even a full encirclement and near-annihilation is not a guarantee that everyone is going to be trapped, although it's still a military victory.
In the modern day you can see this in Mosul, as the original plan called for a "horseshoe" deployment around the city, which would have allowed ISIS fighters to retreat and be attacked in the open. But what ended up happening was a full encirclement of the city, and so you have a pitched battle to the death. In some sense, an encirclement is not unique - it is a common enough goal to force the enemy to retreat into a hidden blocking force, which annihilates the retreating enemy, or keeping a cavalry reserve to ride them down. The big difference is that the event is localized to the encircled area. Or, as at Lake Trasimene or Marathon, terrain is used to block the enemy retreat (a lake and the sea respectively).
So what you see more commonly is in fact the threatening of flanks - single envelopment, or double envelopment, and perhaps a pursuit of a routing army. Instances of entire armies being surrounded are more rare, but the threat of being surrounded is much more common.
I mentioned Tannenberg because the Germans executed a similar maneuver, allowing the Russians to make progress against their center. The Russian general, Samsonov, had initially thought that his being with the main body of his army would allow better situational awareness, but as the battle progressed and he realized what was happening, it was clear to him that he had been mistaken. While being in the rear may have had its own drawbacks, being with the main body meant he was too close to see the bigger picture until it was too late.
The Russian army was surrounded and nearly completely destroyed - actually an anomaly for the era, but presaging the German concept of encirclement warfare that would be used in WW2 and augmented by the use of tanks to poke holes in the enemy line, allowing follow-on troops to roll up the flanks of an enemy, create a ring behind the enemy line, and compress the pocket. Note that in a modern encirclement, the area covered thanks to the range of weapons is much larger, and men are not being packed like sardines.
Of course in reality, full encirclements were tougher to execute than was imagined. During the invasion of Russia in WW2, the Germans found that the creation and compression of pockets created a pattern where their armour was far ahead and exposed, while the main infantry force was engaged in brutally attacking the encircled Russian forces. Then the infantry had to be force-marched to catch up with the tanks, who had to remain idle until the infantry could get to them and relieve them, allowing them to re-deploy. Even when things went well, the encircled pockets were often "leaky", allowing thousands of enemy soldiers to escape at night or through gaps, albeit without much of their equipment.
David Glantz actually theorizes that this encirclement tactic, though successful in one sense, cost the Germans the war in Russia. German armour in Army Group Center was so far ahead of the main infantry force during the approach on Smolensk that they were subject to a huge number of Russian attacks which they had to defend against alone (the infantry were behind them, compressing the pockets they had created, and then trying to force-march to them). Because of this, the German armoured divisions had to deploy along much too thin a frontage, even forcing their engineers and other support units to hold a portion of the front line, and were attacked from multiple directions sometimes simultaneously over an extended period. Because the infantry working with the tanks were not as numerous or as heavily equipped as the regular army units, and because tanks are not especially adept at defensive fighting, Glantz thinks that these spearpoint units took an inordinate number of casualties early on in the operation from which they never fully recovered. They had been blunted, by dint of their own success outrunning their follow-on infantry.
From Glantz's book "Barbarossa Derailed: The Battle for Smolensk" (I don't have page numbers thanks to my Kindle version not displaying them):
"In practice, however, earlier campaigns also demonstrated that some
enemy forces could escape from these encirclements if the follow-on
German infantry failed to advance quickly enough to keep up with the
panzers [armour] and seal the encirclement. This frequently occurred
because the German Army never had enough motor vehicles to equip more
than a small portion of its infantry troops. Instead, the vast
majority of the German Army throughout the Second World War consisted
of foot-mobile infantry and horse-drawn artillery and supplies, which
often forced the Army's panzer and motorized spearheads to pause while
their supporting units caught up by forced marches".
And about Glantz's theory as to the importance of Smolensk:
"...this study argues that the battle for Smolensk was much
larger-scale than previously believed, it damaged Army Group Center
far more than previously thought, and, ultimately, it contributed
significantly to the army group's embarrassing defeat at the gates of
Moscow in early December 1941."
And one of the more interesting and damning statements:
"As a result, the spearhead of Hoth's panzer group...had no choice but
to defend the 'eastern front' east and northeast of Smolensk and also
man the northern half of the inner encirclement line containing and
compressing Soviet forces within the Smolensk pocket.
.
...eight motorized battalions of XXXIX Motorized Corps' 12th Panzer
and 20th Motorized Divisions had to occupy and defend the almost
80-kilometer-wide northern face of the pocket, with, at best, an
average battalion frontage of about 10 kilometers per battalion, from
17 through 24 July. Likewise, the 10 motorized infantry battalions of
18th Motorized and 20th and 7th Panzer Divisions had to defend the
100-kilometer-wide front east and northeast of Smolensk against the
assembling forces of four Soviet armies. Although all of these mobile
divisions tried to economize forces by assigning their reconnaissance
(motorcycle), engineer, and other combat support battalions their own
defensive sectors, their battalion frontages were far too wide to be
effective either in defense or in the attack. This, in turn, also
caused inordinate casualties among the motorized infantry, which only
exacerbated the problem of excessive frontages."