Walter Mitty's daydreams tell the reader a lot about his personality. It is clear that Walter is not an amazing physical specimen of a man, nor is he extremely intelligent. He's not good at simple mechanics, and his coordination is not superb, which is why he isn't a great driver. He can be forgetful at times. All of these traits together make him a bit of a lovable klutz . . . to the reader. To the other characters in the book though, Walter is someone to be avoided or yelled at or laughed at.
Perhaps as a way to compensate for his shortcomings, Walter imagines a second life. In that life he is a quick decision-maker, strong, powerful, loved by people, brave, etc. Walter's daydreams are his way of seeing himself in a more positive light. They are his way of making his boring and mundane daily life and job more exciting.