The pendulum in motion swings back and forth because the force of gravity is pulling it back to the vertical position every time it swings away from it. The pendulum reaches an optimal height before it starts to fall back. However, if the swinging force is too great, the string holding the
pendulum will snap, and the pendulum will fly off.