It’s a teaching tool for many reasons. How to move as a unit, how to take orders, and builds self discipline. Not moving on parade when you aren’t supposed to, making precise movements in unison, and making it look good are all individual contributions to the unit’s overall image and perceived capability.
It also teaches recruits to act when they’re told to. Much easier to embed this with drill than say on an active rifle range.
A lot of it is practical in that it makes roll calls, giving orders, and moving people easier than gaggling. There’s also the ceremonial aspect of it.
Latest Answers