nothing can travel immediately. the 5 second rule is more true than the statement you just said. immediately would mean as soon as it touches the floor the bacteria teleports onto the item you have dropped. everything takes time to travel. even if its a couple nanometers. thus the 5 second rule is far more accurate than what you just said. e,g if it takes 0.000001 seconds to get onto the food then 5 seconds is closer to this amount multiplicatively (0 is infinitely smaller than 0.00001 seconds while 5 seconds is finitely bigger)