Why do you think Walter Mitty always imagines himself as a brave and bold character?
In his daydreams, Walter Mitty imagines himself as an important, successful person because in reality he is the exact opposite. Mitty is a character who fits the trope of the everyman and the henpecked husband; he is an ordinary, average, middle-aged man with a nagging wife and a very dull life. Mitty's daydreams are the only way for him to escape reality and pretend that he is that bold, brave man he so desperately wishes to be.
Although Walter is deeply unsatisfied with his mundane life, he never makes a real attempt to change or to challenge his wife's control over him. For example, at the beginning of the story, when his wife pesters him about getting overshoes and putting his gloves on, all Mitty can muster is a weak "I don't need overshoes." He then complies with his wife's request to put his gloves on. To further demonstrate Mitty's inability to make a significant change in his behavior and become the bold man of his fantasies, Mitty gripes to himself about the parking lot attendant: "They're so damn cocky...they think they know everything." Rather than take charge of the situation and accept responsibility for his mistake, Mitty is content to let the attendant take control and fix the problem.
The only way Mitty can be a man of importance and show courage and action is through his fantasies. Throughout the course of the story, Mitty pretends he is a doctor saving a very prominent man's life, a skilled gunman, and a heroic bomber pilot. He even imagines himself facing a firing squad "undefeated" at the end of the story, further emphasizing the gap between Mitty's fantasy and his reality and his desperation to be the courageous hero of his dreams.