The setting is Salinas Valley in California during the Great Depression. Salinas Valley was the home of many large farms during the Depression. This is important because large farms employed large numbers of workers, often up to hundreds. Farm workers with no steady employment, known as migrant workers because they traveled to find work, would head to these communities. George and Lennie are migrant farm workers, and so it is logical that Salinas Valley would be their destination.
The reason that Steinbeck makes them migrant farm workers is because these type of men were perfect highlight the lonliness and alienation created by the Depression. These men had no home, no place and few belongings to call their own. They were constantly at the mercy of the farmers, and of the weather - in bad conditions, they could be homeless again in moments. Besides being homeless, they would quickly be friendless. It was impossible to develop lasting relationships in this transient lifestyle.
This is why George and Lennie - and later, Candy - dream about getting a home with a little vegetable garden, etc.. They don't want much, they just want to be settled and to have permanancy in their lives.