James Ryder's not exactly a master criminal. He's certainly not in the same league as Moriarty—that's for sure. He's really just an opportunist who saw his chance and took it. As an attendant working at the Hotel Cosmopolitan, he just couldn't help himself when he laid eyes on the Countess's marvelous diamond, the Blue Carbuncle. Having done so, he was sure that no one would suspect him. After all, Ryder had an impeccable reputation; and, in any case, he knew that the finger of suspicion would be pointed at John Horner, an ex-con now working at the hotel as a plumber.
Before fencing the stolen diamond, Ryder tried to hide it by shoving it down the throat of one of his sister's geese. But when the time comes to retrieve the stolen item from the poor unfortunate bird's gullet, Ryder picks the wrong goose. The right goose, however, ends up in Mrs. Peterson's pantry, whose husband approaches Holmes, hoping he can solve this perplexing mystery.
Which of course he does. Yet surprisingly he chooses not to turn Ryder into the police. In fact, he lets him go. Holmes tells Watson that it's not his job to "supply the police's deficiencies." (Which is a rather odd statement to make, given that that's precisely what he does in practically all his cases). Moreover, Ryder is clearly terrified at the thought of getting into trouble; so terrified in fact that Holmes surmises that he'll never commit another crime as long as he lives. He's been "scared straight," we might say. Besides, it's the season of goodwill, and with Christmas just around the corner, Holmes is feeling in an especially charitable mood.