Most cities have some intelligence on their traffic lights, and they do have traffic sensors to know where cars are waiting.
You might not see any cars and are annoyed waiting at the light, but you don’t know what downstream things they are trying to control for. Maybe if they send you through the light, you are going to join some other traffic event that will cause an issue.
It could also just be suboptimal, but it very hard to know just from what you observe as an individal
When I was in the Netherlands, one of the global gold standards in terms of urban planning and design, I noticed it wasn't only more pleasant as a pedestrian or cyclist, it was more pleasant as a driver as well. Lights were smart and did not sit on red forever if you were the only one waiting at an intersection.
This comic suggests there's some "invisible, massively complicated" mesh of signal interactions we can never possibly fathom, and therefore wasting precious hours over the course of our lives sitting at an intersection is the most optimal one.
The Dutch have figured this out, why can't North America?
There are a ton of factors that go into traffic and traffic patterns. For one thing, I would be curious to see total traffic numbers.
Startup Proposal: Intelligent Traffic Signals