The whipping motion is simple mathematics. On the straight section the car and the chain are travelling the same speed, and the same distance. At the ends, the chain continues around the same speed,but the car has to follow a wider curve, so naturally it is forced to accelerate to "keep up".