Spoiler alert: the man eventually dies because he's been foolish. But the reason "To Build a Fire" is so complex is that despite his foolishness, the man shows great perseverance. In fact, the longer the story goes on, the more incredible it is that the man can respond to the potential loss of fingers, toes, or parts of his face with calmness. No matter how bad things get, he never thinks he's going to die. Whether that's hope or delusion is entirely up to you.
By making the man so perseverant, Jack London teaches us about how useless all our efforts are in the face of an indifferent universe.
The story suggests that the man should have given up and died with dignity from the very beginning.