In Melbourne, Australia, a long time ago, they embedded weight sensors in the road for a lot of intersections, so they can react dynamically to traffic conditions.
I live in Berlin, which doesn't have such sensors and it's always frustrating waiting for lights to change when there's no traffic.
Are you sure they're using weight sensors? AFAIK wire loops seem much more useful, plus they have the advantage of also picking up bikes and other lightweight traffic more accurately.
I can also tell you that even in a country with sensors all over the place, I do sometimes end up waiting on an intersection with no traffic. I assume it's some kind of public transportation/emergency vehicle priority system activating, or maybe it's an attempt to calm traffic downstream where loads of traffic has piled up already so intersections don't get blocked.
Either way, adding sensors doesn't necessarily make traffic lights immune to unnecessary waiting times.
From what I've heard, they don't always use the sensors; sometimes they're on a fixed schedule during the day and on request only overnight. Or they might be a fixed schedule always; a classmate at uni did a project around modelling traffic flow and found an intersection or two that turned out to be configured differently from how the council expected; probably a setting that was changed once and never revisited.
I've seen this happen as well, but on different time slots. I think some of it is intentional (the algorithm designed to regulate busy intersections across an entire main road probably doesn't work well when there are only a few people on the road). The ones that operate on a timer all day every day seem to be bugged out, though.
I live in Berlin, which doesn't have such sensors and it's always frustrating waiting for lights to change when there's no traffic.