Tokyo's traffic is pretty reasonable, actually. It's quite surprising. I rarely encounter a traffic light where all the cars don't make it through, unless there's construction.
This is probably because train transport capacity is prodigious, and driving is expensive.
That's exactly it. Almost no one actually drives anywhere: most of the cars are taxis, and most of the rest of the vehicles are commercial (e.g. cargo trucks). When most of the people outside are taking a train, walking, or riding a bicycle, there aren't too many cars on the roads and consequently there isn't much traffic. The busiest places I see are near logistics centers, with lots of truck traffic coming and going.
Also, driving isn't expensive in Tokyo at all, it's actually free except on the toll highways. What's expensive is parking: with few places to park, and it being expensive to rent a parking space in your apartment, it's not that affordable or practical to drive. People also aren't allowed to own cars unless they have a place to park them, so we don't have the problem of car owners fighting over scarce street parking like many other cities.
This is probably because train transport capacity is prodigious, and driving is expensive.