It's to show an exception (which is often the purpose of "yet") because in the first clause it identifies an action, then then it's like "but wait, maybe the action didn't really get going" in the second half of the sentence
The question above is incomplete, the options attached to the question are listed below:
A) The walk from prison to scaffolding
grew farther over the years as the town expanded.
<span>
B) The walk from prison to scaffolding seemed a long and treacherous journey to
Hester.</span>
C) The walk from prison to scaffolding was short, but the onlookers were a
violent crowd.
D) The walk from prison to scaffolding was both emotionally and physically
painful for Hester.
ANSWER
The correct option is B.
What the passage given above is saying is that, the distance from the prison door to the market place is not far, but the shame that Hester experienced as a result of those who thronged to see her makes the journey a long one for her.