Steinbeck wanted to write about the hard lives of itinerant farm workers in Caifornia in the 1930s. He had to show the way they lived on the road and the way the lived when they were able to get jobs on the ranches that dominated the huge central valley of California. He created two characters, Lennie and George, to represent itinerant farm workers in general.
He shows these two men first in a setting by the river where they sleep on the ground. This setting has two purposes. It establishes the setting where Lennie will return to hide after he has killed Curley's wife. It also contrasts the peaceful beauty of nature with the big ranch where nature is exploited for profit and the men who work there are exploited for their labor.
Of Mice and Men is a very short book. People are reluctant to call it a novel but call it a novella instead. According to the eNotes "Introduction" in the Study Guide:
With the success of the novel, Steinbeck worked on a stage version with playwright George Kaufman, who directed the play. Of Mice and Men opened on Broadway in New York City on November 23, 1937, with Wallace Ford as George and Broderick Crawford as Lennie. The reviews were overwhelmingly positive, and the play ran for 207 performances, winning the prestigious New York Drama Critics' Circle Award.
Steinbeck fully intended to adapt his novella to the stage. This explains many things about his book. For one thing, it explains why it is so short. It is just long enough to serve as the plot for a play that would run for a couple of hours. That explains why it ends so abruptly, with George shooting his friend Lennie. It also explains why the novella does not contain any big scenes showing men and horses toiling in the big flat fields with the beautiful mountains in the background. These could not be represented on a stage, so Steinbeck avoided having them in his novella.
Instead, there are only two main settings besides the simple campsite scenes in Chapters 1 and 6, which could be represented on a stage by an artificial campfire lighted by electricity. Most action occurs in a bunkhouse. The rest occurs in a barn. Obviously the stage production was going to be an economical enterprise. Crooks' room is part of the barn and would not have to be a separate setting. The bunkhouse is crude. The men sleep on mattresses made of long bags stuffed with straw. They have one table for playing cards, but they don't even have decent chairs to sit on; instead they sit on upended boxes. Steinbeck is good at using settings to evoke human feelings.
Over each bunk there was nailed an apple box with the opening forward so that it made two shelves for the personal belongings of the occupant of the bunk. And these shelves were loaded with little articles, soap and talcum powder, razors and those Western magqazines ranch men love to read and scoff at and secretly believe.
The barn it just a big empty space with some straw on the flooring. There are many references to horses in the book but they are never shown because they couldn't have horses on the stage in New York. Instead, Steinbeck confines most of his story to interior sets and uses sound effects to represent horses stomping their feet and jingling their harnesses, as well as the sounds of horseshoes thudding on the dirt and clanging when someone outside makes a ringer.
Settings are important because they symbolize the lives of the men confined in them. The campsite scenes symbolize the freedom these men have lost.