John Steinbeck uses the same setting in both the opening and closing scenes of his story. He describes this campsite by a river as a beautiful, peaceful place. Obviously he loves this country and nature in general. One striking sentence on the first page shows his knowledge of the setting and his appreciation of its simple beauty.
On the sandy bank under the trees the leaves lie deep and so crisp that a lizard makes a great skittering if he runs among them.
This is the setting where George and Lennie first appear, and it is the setting where, in the climax which Steinbeck has been building up to since the opening sentences, George kills his trusting friend as an act of mercy.
It is appropriate that the author should make the reader feel the beauty of this piece of nature, a microcosm of the whole earth, because it helps to explain George's motivation. If George does not kill his friend, then the best that can happen to Lennie would be that he would be arrested and sentenced to life imprisonment in a mental institution. Because Lennie would be a convicted homocidal maniac, he would be kept in solitary confinement in a dark cell and never again be able to experience any of the natural beauty the earth has to offer. There is a sharp contrast between George's perception of the riverside setting and his conception of the kind of dungeon Lennie would go to if he somehow managed to escape the lynch mob that was pursuing him.
Steinbeck's main purpose in creating the setting by the river and using it twice may have been to help to explain why George kills his only friend. He is doing it because he empathizes with Lennie. George knows that he himself would rather be dead than confined to a cell and fed through a slot in a steel door. Lennie would not last long in such a grim place. Everybody would be afraid of him because of his crime and because of his huge size. He would be treated like a wild animal, and might become like a wild animal before he finally killed himself.