Lennie still wanted the ranch but George and Lennie didn't have enough money for it and if they went back then Lennie would have gotten killed by Curley. George didn't want to do it but he had no choice. George put him out of his misery because Lennie was gonna die whichever way he went.
At one point in the story, Candy has his dog which is really old and struggling to live. Carlson says he should kill it and put the dog out of its misery. Candy doesn't want to but eventually says yes. Later on Candy has one regret, He wanted to shoot the dog. George knew that Lennie was gonna die some way or another. He vowed to not let anyone hurt Lennie. He knew that Curley was gonna shoot him in the guts and make Lennie suffer so George just gave Lenie a fast death. Lennie and George were best friends so I can tell it was tough for George to do such a thing. In the end he was just looking out for Lennie and didn't want anyone to give him pain. No one should ever shoot their friend but in some situations you will never know. Lennie really wanted to tend the rabbits and George and Candy really wanted the ranch. George and Candy can't buy the ranch by themselves because they just don't have the motivation to do it without Lennie. George made the right choice and if Lennie were to go through the stuff if he were alive he would have a nauseating