I’ve cultivated a habit of pressing unload as soon as my transports start getting shot, and sometimes it is doing me a disservice. Rocket pods for example have very little overkill, and they shoot in very fast bursts that end before the infantry from a killed transport has a chance to “appear”. If I unload, the transport gets shot and the AoE rockets kill the unloaded infantry as well. If I do nothing, the vehicle often survives. If the vehicle gets killed, a full or nearly full health panicked squad spawns after the salvo has finished, and it is going to survive unless the rocket helo has time and ammo for a second salvo.
A less practical example is rushing a town and unloading to avoid RPGs. Good players will rarely have more than 1-2 units guarding the perimeter, so it can be better to just rush in, lose a transport but get to unload the rest in the town instead of having to walk. If the opponent is using carl gustavs and other 16-18AP infantry and you have 2FAV transports, the squad that does get hit will unload panicked but nearly undamaged. Most RPGs shoot once every 6 seconds, so you’ll only get shot once.
Finally, getting shot at by tanks or autocannons. Autocannons similarly to rocket pods have nearly no overkill at range. Tanks are all different, but there’s broadly two cases as long as you have 2+ armor – your transports are getting oneshot with little overkill, or the first shot only heavily damages the transport, meaning the second will kill with a lot of overkill. Tanks shoot once every 6-10 seconds, so they have difficulty killing lots of fastmoving transports that refuse to unload.
There’s always the temptation to take action when your guys are getting shot, but sometimes doing nothing is better. This primarily applies to transports with 2 armor or more, but the rocket thing applies to all of them I think.