Why were formations not able to adjust to being attacked from all sides? According to my simple logic, the amount of people actively fighting on each front line would still be approximately the same, so while not having a retreat-route sucks, casualties should be about the same as when both armies clash in a straight line, shouldn't they?
If anything, wouldn't the encircling army have problems with refilling the front rank when fresh soldiers were spread thin over a long line vs a compact circle?
More can always be said, but the following previous answers are quite excellent explanations.
u/Iphikrates offers a comprehensive treatment on just this topic here, and u/theshadowdawn has a similar answer here, with special reference to the Battle of Cannae.