I think it's important to mark Hawthorne's migration from a young Transcendental idealist to a "Dark Romantic" writer. At one level it's a remarkable journey because the older man comes to embrace the opposite inclinations of his youth; that rather then being inherently good, people were deeply fallible, prone to lapses in judgement and they difted easily to sin. Furthermore, some of their greatest sins were committed under the umbrella of good intentions. On another level, the journey is common-place, as almost all invdividuals discover that the journey of life tempers their youthful idealism. But there is also a personal history the weighed heavily on Hawthorne. He had two stern forefathers in his patrilineal heritage, his great-great-great grandfather and his great-great-grandfather John Hathorne. So he knew well that men could, cloaked in the countenance of goodness and piety, commit great sin. Here is Hawthorne describing them both (starting with the great-great-great grandfather):
He was a soldier, legislator, judge; he was a ruler in the Church; he had all the Puritanical traits, both good and evil. He was likewise a bitter persecutor; as witness the Quakers, who have remembered him in their histories, and relate an incident of his hard severity towards a woman of their sect, which will last longer, it is to be feared, than any record of his better deeds, although these were many. His son, too, inherited the persecuting spirit, and made himself so conspicuous in the martyrdom of the witches, that their blood may fairly be said to have left a stain upon him. So deep a stain, indeed, that his dry old bones, in the Charter Street burial-ground, must still retain it, if they have not crumbled utterly to dust!