One reason is because of his age. He is 63 years old, a time of life when people reflect on what they've accomplished as they look forward to their end years. What he sees in memory is not terribly truthful; in fact, this is true of many humans. We rarely see ourselves clearly when looking back, especially if there are negative aspects of our life and relationships.
Another reason is because of the fatigue he feels from his constant travelling. Of course, if he had been more successful as a salesman, these trips might not have taken such a toll. As the play progresses, Willy loses his job, which only pushes him further to confront his memories.
Lastly, the visit from Biff awakens memories for him as he is saddened by Biff's lack of success, which echoes his own.