Hawthorne is writing The House of the Seven Gables just 70 years after the American Revolution – less than one person's lifetime. So it makes sense that he would be concerned about the gap between the new wave of "republicans" (as apposed to people who support a monarchy), who are against class divisions according to birth and the old aristocracy. Just because the American ideal is supposed to do away with old class politics doesn't mean there is an equal society in the States. Hawthorne suggests that the new American democratic system has introduced its own class divisions based on wealth and power. It's in this greedy environment that energetic, unscrupulous men like Judge Pyncheon flourish.
By creating a contrast between the characters of Judge Pyncheon and Uncle Venner, Hawthorne is teaching a moral lesson that wealth and social status do not bring happiness.
Judge Pyncheon's high social status allows Hawthorne to criticize power structures that reward men based on wealth rather than honesty and kindness.