Assuming the ICE doesn't need to run to warm itself, the turn-on algorithm is a function of main battery state-of-charge (SOC) and the amount of current being drawn from it (i.e. how far you are pressing the pedal). Note that speed is not a factor unless you're going quite fast (42 mph in the NHW11), so that the ICE is required to spin to protect MG1.
Specifically (for the NHW11), when your SOC is 60% and above, you can pull 30A from the battery before the ICE will turn on to help. However, when your SOC is down to 45%, you only get 5A before ICE turn-on. The function is linear between these points but flat beyond them. The numbers are probably similar for the NHW20 ('04 Prius), if that's what you're driving.
So, if you were creeping along in the traffic jam for some time, your SOC was probably dropping pretty steadily. If you goosed it a little to fill in a gap in front of you, you probably drew a few more amps than the HV ECU wanted to give you (remember, saving battery life is one of its primary goals).
Note: even though the ICE comes on when so many amps are being drawn from the battery, it's not necessarily pushing the wheels. Sometimes it's only creating electricity (via MG1) to drive MG2. This takes less gas than pushing the wheels.
Douglas (2002 Silver, Wisconsin)