When the soldiers walk in step, they produce some fixed frequency. If this frequency corresponds the natural frequency of bridge, the resonance can take place. This in turn will make the bridge to vibrate violently, and hence make it collapse. To avoid such a situation, the soliders are asked not to march in step.