Classic old school military method. You break down individuals to build up a unit, platoon, or in this case a team.
The concept is there is no individuality on a team. Just the various parts that make up the one. If all are literally on the same page in lock step with each other then the team or one becomes more important than the individual.
So these small seemingly insignificant things like sock color are exactly how to break down the individual. If your can't follow instructions you're out, or in this case you're punished.
I together with my platoon spent many hours in front leaning rest position ready to "beat our faces" (do pushups for things even more silly sounding than wearing the wrong color socks)