The Jungle has a socialist agenda. "Society" is in the word "socialist," so it makes sense that perhaps the most important theme in this novel is society and class. Sinclair is writing against the ideal of the "American Dream." The American Dream promises that, if you work hard, you can build a better life for yourself and your family. What that ideology implies, though, is that there are no obstacles between poor men and success except their own willingness or unwillingness to work. It's as though American society has no social classes or barriers to advancement. Sinclair is trying to expose just how many obstacles there are between poor working men and success: problems like lack of education, lack of influence or power in society, poor familiarity with official government and legal systems, and enduring poverty all prevent good guys like Jurgis from making it in this dog-eat-dog world. Once workers like Jurgis get stuck in their dead-end jobs, they grow bitter, violent, and often even criminal – which just confirms their place at the lower end of the social spectrum. Sinclair is pointing out the United States does have a class system. It's just better hidden than the more traditional, hereditary class systems of places like Lithuania.
In his critique of the American Dream, Upton Sinclair uses the image of the slaughterhouse to draw a comparison between hopeful Jurgis and his family entering the American workplace and hogs going peacefully to the killing floors.
Upton Sinclair uses Jurgis's encounters with upper-class characters such as Jack Duane and Freddie Jones to show that capitalism has a destructive influence even in rich, well-to-do families.