In, To Build a Fire, the man is shown to be woefully inept at survival and in the end, is deemed by nature to be unworthy. The dog, a creature of nature, is used by the author as a 'foil' of sorts. He is better able to take care of himself in such situations. The dog doesn't feel the cold, but the man does. The instincts that allow the dog to survive are the very instincts that the man possesses, too, but chooses to ignore.
The real comparison comes when the dog gets his legs wet and the dog understands that walking on them will mean death. Lastly, when it is evident that the man is dead, the dog howls once, then turns on his heel and goes back to the town where he will find food, shelter, and fire.