The classic answer is that encircled troops lose confidence and are cut off from their camp. Encircled armies in the age of sword, spear and bow were usually defeated.
Encirclements began to look different later on, in 1870-1914. Armies didn't have such a reliance on camps, but employed railway lines. The basic understanding about why encirclements were bad wasn't changed, though.
The real change came in 1940 when railway logistics, (supposedly) continuous front lines and (partial) encirclements were combined. This is the period that interests me most, for it comes the closest to our time.
A logistician would say being encircled is bad because they cut lines of supply.
Others might say it's bad because you suddenly have to provide security all-round (strangely, this didn't seem to bother the encirclers so much).
A theatre commander might regret that the encircled troops will not be available for his operations.
Everyone will agree that encircled forces suffer badly and are often lost.
The real core behind all this is what's really interesting, what lies behind the petty surface:
Forces being encircled means that they don't meet their purpose (any more).
Their purpose was usually either to attack or to hold a part of the (continuous) front line. Neither is possible for encircled forces any more. The loss of their functionality is an immediate blow tot heir whole army.
Forces getting encircled was in part so horrendous because World War Two forces in Europe were so very much dependent on continuous front lines for man, many purposes.
This aspect is lost. Nowadays there's likely not going to be a real continuous front line anyway due to lack of forces. This explains in part why nowadays the logistical and attrition effects of encirclements are so very prominent in our thought.
I wrote several (unpublished) drafts to approach the issue of functions in military theory. We don't pay enough attention to them.
Sure, we know how to encircle (in theory), we know what providing security means etc - but few people still seem to reason about the function of tools, weapons and methods.(1) We're looking very much at resembling historical examples or at technical specifications of hardware. Yet, what exactly ire the functions of a tank, of a front line, of firepower, of reconnaissance?
Even I - complaining about it myself - didn't pay attention to it every time. Once I wrote about what armoured reconnaissance is good for. Yet, I omitted the very basic raison d'être for recce troops:
You expose few to great hazards in order to spare much more.
Yes, armoured reconnaissance is about sacrificing a part of your forces for overall success and survivability. This was somehow lost in the age of near-zero casualty campaigns.
I will - sooner or later - write an exhaustive blog post about the (lost) function of front lines, and I wrote already a lot about how to replace said functions within current resource constraints.
This example - lost function due to a method that slipped out of use - shows the importance of a theoretical understanding of functions. Without it, you may not see clearly what you're missing, what you need to get a substitute for somehow.
Without a clear theoretical understanding of functions in warfare we'll blunder in our next great war, being no better than the ill-prepared blunderers of 1914.