Why did Peyton Farquhar remain anonymous until the second part of the story?
It would perhaps be more correct to say that the author Ambrose Bierce chose to start the story in media res and reserve all of his exposition until Part 2 of "An Occurrence at Owl Creek Bridge." Nothing would be gained dramatically if Bierce had revealed the condemned man's name at the beginning of the story. The author might feel compelled to reveal more about him than his name, which means nothing by itself. The way Bierce handled the story is one of the best things about it. Naturally we want to know who this man is and why he is being hanged, as well as a lot of other details. But the author can easily keep the reader in suspense because the scene described in Part 1 and the emotions being experienced by the man we later learn is named Peyton Farquhar are so compelling that they forestall any questions we might have about what led up to this execution. Bierce fully intended to satisfy his reader's curiosity about the protagonist, including the reader's desire to know what he did and how he got caught doing it. All of this is very neatly covered in what amounts to a flashback in Part 2. When we finish reading Part 2 we are fully satisfied that we know everything we need to know about Peyton Farquhar and his foiled attempt to sabotage the Owl Creek Bridge.
The soldier reflected. "I was there a month ago," he replied. "I observed that the flood of last winter had lodged a great quantity of driftwood against the wooden pier at this end of the bridge. It is now dry and would burn like tinder."
The lady had now brought the water, which the soldier drank. He thanked her ceremoniously, bowed to her husband and rode away. An hour later, after nightfall, he repassed the plantation, going northward in the direction from which he had come. He was a Federal scout.
The ominous concluding words of Part 2 tell a great deal that is not actually dramatized in the story. We can almost see the whole scenario. Farquhar rode to Owl Creek Bridge at night, tied his horse to a tree some little distance from the bridge, crept up to the driftwood and doused it with a whole can of kerosene. Then as he lit the match a dozen dark lanterns were uncovered and he found himself surrounded by Union soldiers. He had walked into a trap. And that explains why he is standing on Owl Creek Bridge in the opening sentences of Part 1, waiting to be hanged. It is beautiful storytelling and explains why "An Occurrence at Owl Creek Bridge" is so often anthologized and why it is considered Ambrose Bierce's best short story.