In a perfect World [hahaha] everything would be pre-ordained.
However, aircraft go u/s and so do boarding ramps. Aircraft arrive late or early - some get diverted for whatever reason.
I always expect BA216 to LHR to be at Gate B-42 at IAD, because that's how it is: it's the BA Gate, basically. OTOH, I have no idea where BA217 to IAD will leave LHR T5 until they have decided (a) it's there, (b) serviceable and (c) ready to go. I've had the 217 from a remote stand via Gate A-10 by bus, and from B and C Gates.
Flexibility is the name of the game, especially at crowded/busy airports.