It doesn't seem that Steinbeck had overt political motives when he wrote The Grapes of Wrath. He wanted to expose the plight of migrant workers who he had worked and lived with on one of many jobs he had before become an acclaimed author.
During the summers and other times he was away from college, Steinbeck worked as a farm laborer, sometimes living with migrants in the farm’s bunkhouse.
Steinbeck endeavored to speak out on behalf of migrant workers while working for as a reporter. The story was...
...based on newspaper articles about migrant agricultural workers that he had written in San Francisco.
Steinbeck's desire was to help the migrant workers who had been displaced from their farms in the Midwest by natural disaster: drought dried up the land and crops; the soil became so loose that wind storms created what became known as the Dust Bowl. Banks forced small farms to stop working: houses were bulldozed and the farmers—some who had worked the same land for generations—were forced (with physical threats and those of the law) to leave their homes, where parents had been buried, babies born and families raised.
Ads for workers ultimately drew three hundred thousand people to California looking for work during the disastrous economic times of the Great Depression of the 1930s. However, flyers (in the novel) asked for five hundred people (for example), for work needing only two hundred. Eventually, perhaps a thousand people would come for a job that required only two hundred workers. When this happened, powerful farmers dropped their wages so that workers could not even feed their families; the work was completed in half the time, cutting short the jobs parents had hoped would last longer and support their families.
When the "Okies" (a term of contempt coined for those from Oklahoma—though the Dust Bowl moved to other states as well) arrived, they were berated, cheated, turned away, and even arrested and jailed if they complained that the pay offered for a job was too low. Then they were called "reds" and were often beaten by sheriffs and deputies, until they became "bull-simple," either pretending to be simple-minded to avoid further trouble, or having suffered brain damage.
Steinbeck may have seemed a political activist in criticizing the small transient shantytowns, each called "Hooverville:"
They were named after the President of the United States at the time, Herbert Hoover, because he allegedly let the nation slide into depression.
If people in Hooverville did not cooperate when contractors (who often conducted their searches for workers illegally) arrived to hire people, Steinbeck described what would happen. Character Tom Joad at one point says he would speak out; if necessary, he would fight anyone who would stand in his way to find honest, fairly-compensated work to support his family:
I ain't gonna take it...I'll kick the hell outa somebody.
Floyd, a man from this particular shantytown explained:
You're nuts...They'll pick you right off. You got no name, no property. They'll find you in a ditch...Be one little line in the paper—know what it'll say? 'Vagrant found dead.' An' that's all.
If more than one person complained, the sheriff would decide that the Department of Health had condemned the site, evict everyone and burn it all out.
Steinbeck became an advocate of the disenfranchised. He may have seemed to have a political agenda in criticizing how badly these people were treated.