Pontius Pilate must have done something wrong to have been assigned prefect to a squalid province at the edge of the Roman empire. He was far from the seat of power, far from the entertainment of Rome or of the intrigue of its senators. Instead, his headaches were centered on keeping separated the continually warring factions of Judaea: the eternally quarrelsome Jews, and the equally quarrelsome people groups of the Levant.
Fortunately, he was backed by a Roman legion. The Pax Romana was nothing if not efficient. Life was cheap, and peace was made at the point of a sword. It was easier to eliminate a bone of contention than to try to re-educate it.
A local religious phenomenon, a young man with a messianic presence, was stirring up the established religious powers in Jerusalem. The religious leaders came to him and accused him of various things; whether they were true or not didn't matter: he had the backing of a subset of the people, and he became a threat. A kangaroo court was set up, various witnesses were bribed to speak against him, and he was dragged in front of the Roman prefect to legitimate their assertions. They wanted to wash their hands of him, but they also wanted the imprimatur of their occupiers so that they could diffuse the responsibility of eliminating him.
Pilate had probably been raised and trained within the Roman system of government. He'd seen intrigue like this before on a far larger scale. Still, the form of law had to be observed. It was a question of the lesser of two evils.
The young man sounded completely self-deluded. Like all zealots, he didn't fear death. The concept of a martyr probably hadn't yet been recognized as a valuable ideological tool, so he didn't even have that to comfort himself with. No, he really believed he was a true tool of God.
The young man had no military backing, no political backing, some popular backing, but not enough to make him worry that the Legion couldn't eliminate them quickly and with maximum brutality. The calculus of Pilate's decision was easy. Jesus was a dead man.
John 19:18: Where they crucified him, and two other with him, on either side one, and Jesus in the midst.
John 19:19: And Pilate wrote a title, and put it on the cross. And the writing was, JESUS OF NAZARETH THE KING OF THE JEWS.
John 19:20: This title then read many of the Jews: for the place where Jesus was crucified was nigh to the city: and it was written in Hebrew, and Greek, and Latin.
John 19:21: Then said the chief priests of the Jews to Pilate, Write not, The King of the Jews; but that he said, I am King of the Jews.
John 19:22: Pilate answered, What I have written, I have written.
And that's the story behind the saying.
Whenever you hear the phrase QUOD SCRIPSI SCRIPSI, the writer is making the association between a fait accompli lesser-of-two-evils decision and the speaker's wish to put that decision behind him. He won't go back and make any changes to the transcript. He won't bother to bury the bodies of the innocent. He wants the record of history to show what had happened there in all its naked grotesqueness.