The character of Carlson makes clear from the start that he dislikes Candy's dog, and that he would not mind seeing getting shot in favor of raising new pups.
He tells Slim in chapter 2
"Whyn't you get Candy to shoot his old dog and give him one of the pups to raise up? I can smell that dog a mile away. Got no teeth, damn near blind, can't eat. Candy feeds him milk. He can't chew nothing else"
Moreover, he also tells Candy himself on chapter 3 that the dog is neither good for Candy nor for itself. He wants the dog gone.
The thing with Carlson is that he has turned into a bitter and argumentative, petty and ugly person as a result of years working at the ranch. He has no social skills, he has nothing to live for, and as a result, he cannot appreciate what others see in things such as animal companions, or friends. Carlson is an ugly, broken, angry man.
We do know that he may have a point, whatsoever, for Candy's dog is indeed ugly, smelly, and weak. The dog may be on his last days for all we know. However, there is one thing to advice someone we know against keeping an animal suffering, and there is another thing to push for it to happen because otherwise one would be called a coward or a weenie. The problem is not his idea behind ending the dog's life, but the method that he chooses to tell about it.
When the deed was done, the reader may have felt Candy's loss, but Carlson's rebuke to any emotion switches the audience from sad to anger quite fast. That was the way of life in the ranch, though: very little to feel sorry for; just bitter and angry for being the ones "chosen" to be there.
Carlson's complaints about Candy's dog and his eventual shooting the dog are a relatively trivial incident. There was no particular reason to include it in this short book except for the fact that it shows Carlson owns a pistol. This is the same pistol with which George will kill Lennie in the last chapter--and that is an incident of the utmost importance. Carlson not only kills the dog but he explains in George's hearing where to point the barrel so that death will be quick and painless. When George shoots Lennie he points Carlson's gun at the same spot on the back of Lennie's head.
The pistol is a German Luger. This is the first time the reader learns of its existence. Steinbeck describes the gun in considerable detail when Carlson cleans it after shooting the dog. This is so that George can see how the complicated German automatic pistol works. So George knows where it is kept, how to inject a cartridge into firing position, and where to point it when he shoots Lennie. Steinbeck adapted the novella into a play which was produced in New York City the same year the book was published, which was 1937. Since a Luger is a distinctive looking handgun, the reader, and the theater audience, will understand immediately that this is Carlson's pistol. And since George has brought it from the ranch where Carlson kept it under his bunk, the reader and audience will understand that George intended to kill Lennie from the time he left the bunkhouse.
Steinbeck's plot required that George kill Lennie to end the story. In order to kill Lennie, George had to have a weapon. Lennie is much bigger and stronger. George can only kill him with a gun. He can use a rifle or shotgun because they would be too conspicuous and possibly too unwieldy. There has to be a pistol. Steinbeck has to establish its existence and location before George appropriates it and uses it. This explains the incident involving Candy's smelly old dog.
Carlson is a minor character. He is a middle-aged man who is grouchy and standoffish. Since he owns a German Luger, it is a strong indication that he served in World War I around 1917 and 1918 and brought the Luger home as a souvenir. If he was around twenty years old during the war, he would be approaching middle-age at the time period of Steinbeck's story. No doubt Carlson had dreams of glory in his youth and now feels disillusioned because he can only survive by doing hard manual labor for paltry wages and poor food, and he has no job security at that. All his jobs are temporary. He sleeps in bunkhouses with a bunch of ignorant losers. He doesn't fraternize with him because he doesn't want to accept the fact that he is one of them. The bad smell of Candy's old dog is a constant reminder of his dead-end existence. That is why the smell bothers him more than it does the others. Americans called that time period the Great Depression partly because it was so psychologically depressing. Carlson may have killed German soldiers in the war. He keeps The Luger as a souvenir and also for protection in the dangerous hobo world that drifters like him have to survive in. He might have even used it once or twice in California! Who knows? With the bad mood that characterizes this lonely man, he might have even decided to use it on himself some day.