Leap seconds are needed occasionally because modern atomic clocks measure time with great accuracy, while the rotation of the Earth can be inconsistent. The rotation of the Earth has been slowing down, so leap seconds keep the clocks and the Earth from getting out of sync with each another.