The square formation were also used to be formed around artillery, to protect it from cavalry attacks, which could be pretty devastating. Also, tight and relatively compact formations such as squares had an effect on horses. Horses are reluctant to charge something they perceive as a compact obstacle and usually slow down, which effectively caused cavalry to lose some of its shock value...