Friendship is one of the major themes of the book. And this theme is pronounced because it is conspicuously missing in the lives of the other men (apart from George and Lennie). For example, Steinbeck writes the following about the lives of ranchers:
"Guys like us, that work on ranches, are the loneliest guys in the world. They got no family. They don't belong no place. They come to a ranch an' work up a stake and then they go inta town and blow their stake, and the first thing you know they're poundin' their tail on some other ranch. They ain't got nothing to look ahead to."
However, when it comes to George and Lennie, they have each other, which is the most powerful force they possess.
George and Lennie remind each of this reality.
"With us it ain't like that. We got a future. We got somebody to talk to that gives a damn about us. We don't have to sit in no bar room blowin' in our jack jus' because we got no place else to go. If them other guys gets in jail they can rot for all anybody gives a damn. But not us." Lennie broke in. "But not us! An' why? Because… because I got you to look after me, and you got me to look after you, and that's why." He laughed delightedly. "Go on now, George!"
All of this gives them the power to dream, which is also conspicuously missing in the other men. They dream of owning land and living off the fat of it. In fact, their dream almost becomes a reality. It moves Candy to donate his money and even moves Crooks to want to join them.
Now as for reality, in the end the dream does not come to pass. The whole novella ends on a sad note. I do not think Steinbeck is saying that it is bad to dream, but that for the working man these dream are awfully difficult to fulfill.