The thing is that when the first row of cars slows down for any reason, the second row must also slow down, though always with a slight delay to avoid colliding with the cars ahead. This reaction then propagates backward: the third row reacts to the second, the fourth to the third, and so on. By the time this chain of delayed braking reaches a row that is far enough back, the very first row may have already started moving again. However, the accumulated sequence of decelerations (and in many cases, complete stops) has already triggered the formation of a traffic jam.
This is usually modeled as a simplified version of Burgers’ equation: