Yeah this is probably my major peeve about films and TV (along with swords as lightsabers cutting through armor). It turns out, our ancestors really didn't like dying and would do things to prevent it, such as making sure you know who's behind you and on your side. Running, too. Formations would walk into each other slowly because throughout history, battles were giant games of chicken where the first person to lose their nerve gets stabbed.
Moving in an orderly fashion where you can avoid getting stabbed in the back, avoid running out of breath, and know what everyone on your side is doing is much, much more effective than using your face as a battering ram to headbutt the shields of the other side.
Then there's the whole getting trampled to death by 2,000 pound animals (or bigger, like that time Hannibal crossed the Alps with African elephants). Standing in a block and making a wall of knives is the easiest way to avoid getting body slammed by a horse.