With regard to the question about Carlson's Luger in John Steinbeck's short novel Of Mice and Men, I would like to suggest an additional explanation.
Steinbeck wanted to write a story about a man who performs a mercy killing to save his best friend from being lynched. That must have been in his mind when he was writing the first chapter, in which George tells Lennie to meet him at this campsite if he should get into trouble. Now the only feasible way for George to kill Lennie would be with a gun. It would be too gruesome if he used a knife or a club. But George does not own a gun. Steinbeck had to establish that a gun existed and that George would have access to it if he needed it. This partially explains the business of Carlson shooting Candy's dog.
Candy could hardly have done it himself because he only has one hand and probably has no experience with a automatic pistol. Here is a significant quote:
He pointed with his right arm, and out of the sleeve came a round stick-like wrist, but no hand.
If Candy had been right-handed--as most men are--it would have been very difficult for him to try to shoot his dog with a strange foreign-made pistol with his left hand. Pointing with his right arm seems intended to prove that Candy is, or was, right-handed.
The fact that the gun is a German Luger suggests that Carlson served in World War I and brought it back as a souvenir. Lugers, which only German officers carried, were the most popular souvenirs the soldiers brought back from Europe.
After Carlson shoots Candy's dog, Steinbeck provides a long description of how Carlson cares for his prized weapon:
Carlson found a little cleaning rod in the bag and a can of oil. He laid them on his bed and then brought out the pistol, took out the magazine and snapped the loaded shell from the chamber. Then he fell to cleaning the barrel with the little rod. When the ejector snapped, Candy turned over and looked for a moment at the gun before he turned back to the wall again.
Then, a bit later:
Carlson finished the cleaning of the gun and put it in the bag and pushed the bag under his bunk.
George and Lennie have plenty of time to observe how the Luger works and where Carlson keeps it. A large measure of Steinbeck's motive for including the episode about Carlson shooting Candy's dog is to establish that there is a gun, that it is easily accessible to either Lennie or George, that George at least has seen how to handle this sophisticated foreign weapon, and that he has been told exactly where to point it.
If Steinbeck had written the last chapter with George simply producing a handgun out of his side pocket, with no explanation of where he had gotten it, that would have spoiled the verisimilitude. The reader would have found it hard to believe that George, all of a sudden, had a gun. As written, George not only has the gun but knows how to fire it and where to point it. Here is Steinbeck's description:
"We gonna get a little place," George began. He reached in his side pocket and brought out Carlson's Luger; he snapped off the safety, and the hand and gun lay on the ground behind Lennie's back. He looked at the back of Lennie's head, at the place where the spine and skull were joined.
A German Luger is a very distinctive-looking handgun. It had to be established that Carlson's gun was a Luger so that the reader (and the future viewer when the book was adapted into a stage play) would understand immediately how George had come to possess a pistol.