Mac and Jim are Communist Party "field workers" in the troublesome 1930s on the West coast of the US. Their "job" is to incite violent strikes of workers who are exploited by their employers, mostly in low-skilled jobs like apple and cotton picking.
The book certainly has a political agenda to it, but I'm not sure it's the one people actually see. It's surprising to find so many reviews online that claim that Steinbeck "carries the Socialist flag high in this novel", completely ignoring the very obvious and sometimes explicit irony the author uses when describing "the Party", its members and methods.
For example, here's a short quote from a dialog:
"Who produces the goods?" Joy demanded. "Why - the workers," said Jim. A foxy look came on Joy's face, a very wise and secret look. "And who takes the profits?" "The people with invested capital." Joy shouted, "But they don't produce nothing. What right they got to the profits?"
Now, if you don't see through the lines here and assume this is an valid anti-capitalist claim, you should really check your basic premises. This part of the conversation is obviously cynical, portraying the catch phrases used by socialists to affect public opinion of enraged crowds that behave more like animals than like men (this point of crowds is a recurring theme in the novel, by the way). The phrase becomes even more ironic taking into account that Joy is feeble-minded.
Also, think of the novel's title, for a moment. Isn't it ironic, even if just a little bit?
Steinbeck actually sympathizes with the workers, who've been fooled to get into a hopeless situation. But he also sees the other side, and he clearly criticizes the ways of the "party men", and their methods. These provocateurs are using the workers for their purpose in a way not much different from the land-owners.
Checking up on Steinbeck's biography, I see that during the writing of this novel he was still on the "left side" of the political map, at least formally. Later he shifted much more to the "right side". Perhaps this book portrays the beginning of his shifting feelings.
And again, I must note my awe at his writing skill. Steinbeck manages to portray some world in a way so convincing that you can't help wondering whether he himself has been an apple picker or a party inciter. He really gets into the role of people and produces very believable scenarios.