People seem to assume that flights/miles are sent over to the FFP the moment the flight happens, in realtime. Thus, thinking that changing the FFP number at the gate will have an effect on the upcoming flight.
While this may be true in some specific cases, I would expect that these exchanges between airlines and FFP's mostly happen at set intervals. Eg, once per day - or once every few days. Since the FFP number applies to the booking, and not a specific segment, the moment this exchange-process takes place is when the booking is checked for the FFP number. The FFP number in there, at that specific moment, will most likely be used to credit all the flown segments (up to that point) to.
Of course this is just based on guesswork, but I sincerely doubt if any airline would invest in having a 'real time' infrastructure in order to credit miles/flights to the FFP the moment that a flight takes place. Doing it in batches would also explain why some airlines take multiple days to credit flights. Remember, this is all digital, so no need for delays. Only if a delay is introduced on purpose - for example by only exchanging these details once per day - would you see the flight credited with that same delay.