The Custom House is an allegorical representation of life under American capitalism. The front of the Custom House is decorated with a huge "American eagle," under which everyone passes when they go inside to do business in the Custom House:
[M]any people are seeking, at this very moment, to shelter themselves under the wing of the federal eagle; imagining, I presume, that her bosom has all the softness and snugness of an eider-down pillow. But she has no great tenderness, even in her best of moods, and, sooner or later,—oftener soon than late,—is apt to fling off her nestlings, with a scratch of her claw, a dab of her beak, or a rankling wound from her barbed arrows.
The eagle represents the federal government. The Custom House is the place where federal taxes on trade are processed: the eagle represents capitalism as the nest of the federal government. Gathering under the eagle, or the federal government, promises safety. But it's often more dangerous than people expect. The eagle's violence, which can erupt seemingly at random and can result in the injury or death of her "nestlings," represents the federal government's prioritization of free trade and party politics over the well-being of the country's inhabitants. Because it operated according to the flow of money, the government protected the interests dear to the richest and most powerful inhabitants. Hawthorne's concerns mirror the concerns many people have today over money's influence on the government.
Writing in the mid-19th century, Hawthorne was especially concerned with the way free trade was being used as an argument not to abolish slavery in the United States. Even in states where slavery had been abolished for decades, capitalist corruption was causing social problems related to exploited labor. In "The Custom House," for instance, the frame narrator (a Democrat) describes how he gives his labor to the Custom House only to be ousted from office once the new Whig government takes power. Despite professing to be against the "tyranny of the majority," the Whig party nonetheless participates in partisan politics by which those with money and power exploit and cast aside everyone else. Hawthorne's commentary throughout the novel about the societal problems caused by Puritan ideals stands in for further commentary about the social problems caused in the 19th century by capitalism as the force that holds American life together.