Wired as an astable, the 555 charges C1 through R1 and R2, discharges it through R2 alone, and repeats — producing a steady square wave on pin 3. It has no idea what a traffic light is. It just ticks, and R2 and C1 decide how slowly.
The CD4017 takes over from there. It has ten outputs and keeps exactly one of them high at a time, advancing to the next on every rising edge of the clock. Feed it one tick per second and the high output crawls from Q0 to Q9 over ten seconds.
That's already a sequence — it's just the wrong shape. Real signals hold red and green for a while and flash amber briefly, so the outputs get grouped: four counts of red, four of green, one of amber. Wiring Q9 back to the reset pin snaps the counter home the instant it lands there, and the pattern loops.
Where the diodes come in
Grouping outputs — the red LED needs to light on four separate counts, so four outputs have to drive one wire. Connect them directly and whichever output is high back-feeds current into the three that are low.
One-way valves — a diode on each output lets current out toward the LED but blocks anything coming back. The four counts then behave as one long phase.
Changing the timing is just re-grouping. Give amber two counts instead of one by moving the reset wire from Q9 to the next output and adding a diode. Nothing else changes.