In pre-modern warfare, if you were fighting on foot, you would likely be physically touching your companions in arms for almost the entire battle. The guy in front of you, or the guy on horseback that had just charged in were the enemy. One really didn't see one-on-one fighting, or a skilled warrior charging out in front of the lines.
You fought close together because it offered the most defense and support. You pretty much either stayed in a tightly packed mass, or you got killed/lost the battle. It is a reason why the spear has always been such a common weapon, because it allowed the most amount of killing power to be used against the enemy until the advent of massed firearms. The ancient Greeks had the phalanx, the dark ages had the shield wall, the middle ages had the "battles" (not sure if that's the right spelling) and then came the pike and tercio formations.
As an example of how tightly packed I am talking about, at the battle of Roosebeke in 1382 there were accounts of the Flemmish infantry literally getting crushed to death instead of getting struck down by an enemy.
Here's a quite recent, very good thread on the subject.
Link.