On a turn, outside marchers take shorter steps than inside marchers because they travel a shorter distance. The sharper the turn, the more the outside marchers shorten their steps. Coordination and timing are essential for a smooth curve.
Light bends when entering a prism because it slows down (change in speed). The amount of bending depends on the prism's refractive index. Similarly, the marching line bends because the marchers' speed changes across the formation—outside marchers slow down (shorter steps), causing the line to curve inward. Both phenomena result from a change in speed across a wavefront.