I happen to be a traffic engineer who operates signals in the USA. We may not have the most advanced technology but I can assure that we don't not write code to operate our signals. We do enter different parameters that govern the amount of time that you have to wait.
In most situations it comes down to if you want to favor vehicles or if you want to favor pedestrians. As everyone has mentioned it is difficult to accommodate both as they would like.
Also as government worker I can assure we are not highly paid. We make a decent living but there is actually a shortage of people right now that want to do the work.