This story probably was written during a holiday season. Fat goose and invaluable treasure. Also it wasn’t much about hideous crimes. On the contrary, the story was unexpectedly funny. Even Holmes needed a good laugh during the holiday, didn’t he?
At the end of the story, Holmes let the thief go. Now think about it, he was actually quite forgiven in some circumstances and did let the criminals go. However, he was very principled.
1) When no damage was actually incurred materially (e.g. the treasure was returned to its rightful owner), the criminals deserved a second chance.
2) When punishment was already on its way. (e.g. the murderer was dying out of terminal illness), the justice was in a sense already served.