Hi Peter Yu,
The traffic lighting systems are for drivers to communicate with eachother and manage driving behavior without having to directly communicate with other drivers. Some speed limits are fast and dangerous and the yellow light is to warn drivers when they are approaching an intersection that they have a certain distance and time to begin applying their breaks. It is very important that drivers get a warning time before the light turns immediately to red to prevent accidents.
------------------------------
Oanh "Wan" Le, A.M.ASCE (She/Her)
Rochdale, MA
------------------------------