There are numerous chronological variations in the Gospels. Some see this as evidence of fabrication; others see this as evidence of authenticity & independent authorship. A useful survey of what we should expect to find in eyewitness evidence is found in detective J. Warner Wallace's Cold Case Christianity. Wallace concludes the Gospels provide sometimes-overlapping and sometimes-complementary eyewitness testimony.
--
Gospel Chronology in General
None of the synoptic authors intend to present a strictly chronological account of Jesus' ministry. Matthew's Gospel is largely organized by topic; Luke's is largely sequenced by geography. For Mark, it depends on your solution to the Synoptic Problem (mine has Mark drawing from the order of his sources, Matthew & Luke).
The variations in order have been known and discussed for more than 19 centuries. Luke 1:3 indicates that Luke is writing "in order" (i.e. he thinks other accounts are not in order?), but doesn't specify in what order--we're tempted to assume chronological order but Luke doesn't say that. In the early 2nd century Papias of Hieropolis quoted a first generation Elder who explained:
Mark, having become the interpreter of Peter, wrote down accurately,
though not in order, whatsoever he remembered of the things said or
done by Christ. For he neither heard the Lord nor followed him, but
afterward, as I said, he followed Peter, who adapted his teaching to
the needs of his hearers, but with no intention of giving a connected
account of the Lord's discourses, so that Mark committed no error
while he thus wrote some things as he remembered them. For he was
careful of one thing, not to omit any of the things which he had
heard, and not to state any of them falsely. (as quoted in HE 3.39.15)
The fact that Papias had to share this information indicates that this question was already being asked at his time.
John offers a wealth of chronological details not found in the synoptics (e.g. calling out visits to Jerusalem for Passover feasts), but I am not persuaded that his account is intended to be entirely chronologically sequential.
It is when we read these documents with modern eyes that we expect everything to be chronologically continuous. These documents were not written by modern writers and the original recipients did not read them with modern eyes. I've recently been reading Dio Cassius and I find it interesting that he's quite willing to do flashbacks and flash-forwards and go off on asides that are related to the subject at hand...but are not chronologically continuous.
--
The specifics of the Passion Narrative
Pilate vacillated in the decision to have Jesus executed. Per Luke 23:22, Pilate tried at least 3 times to have Jesus released. My channel has a video discussing why Pilate finally gave in; but the long and the short of it is that Pilate did not want to execute Jesus and only stopped fighting that decision when the Sanhedrin used Pilate's violent past to politically box him in.
Thus, it is quite consistent to read John's narrative and see that Pilate reaches a point where he agrees to have Jesus crucified (John 19:6), only to change his mind (John 19:12), and then change his mind again (John 19:16). John's account of the last few hours of Jesus' life is far more detailed than that of Matthew or Mark. I propose the most likely sequence (focusing only on the OP's question) is this:
- Pilate doesn't want to kill Jesus, so he proposes a prisoner release (Matt. 27:17, John 18:39)
- Prisoner release backfires--Barabbas is chosen (Matt. 27:21, John 18:40)
- Pilate initially agrees to sentence Jesus...but he's not all in yet (Matt. 27:24); Luke 23:16 makes it clear Pilate has a plan
- Jesus is scourged (Matt 27:26a, John 19:1)
- Pilate presents the wounded Jesus to the people to appeal to their pity--Pilate's still trying to get Jesus off (John 19:4-5)
- Additional back and forth recorded only by John (John 19:6-15)
- Under threat of an appeal to Rome, Pilate finally backs down, and after having reversed himself at least twice, sends Jesus to be crucified (John 19:16)
There are yet further details provided only by Luke. In fairness to Matthew, he's running out of space on his scroll at this point, and had to leave things out. If John wrote last (as Irenaeus attested--see Against Heresies 3.1.1), he had the advantage of being able to supplement what other authors had recorded.
If we grant traditional attributions of authorship, John is the only evangelist who was present for Jesus' trial. John's essentially saying "I was there, let me tell you a little more about what happened."
--
Conclusion
Chronological variation is common among the Gospels; much of it is easily attributable to the way they structured their writings.
Pilate vacillated in his decision to kill Jesus, and so the "decision" to have Jesus executed was a process more than a single moment in time.