Why does Ben appear in Death of a Salesman?
Ben symbolizes Willy's dream and his delusion. Ben is, literally, a combination of these for Willy.
Appearing only in moments of Willy's mental disorder and hallucination, Ben is intricately connected to the ideas of dissolution, dream, and fantasy.
When he appears, Ben speaks about his wealth, his boldness and his adventures, all of which Willy admires but lacks. Willy has lived a life of mistakes, but no adventure; of toil but little success. Ben represents an alternative to Willy's path through life and it is this alternative that also stands as Willy's definition of success and greatness.
For Willy, there is no chance at greatness. Biff realizes this is the case for his father and for himself, coming to acknowledge the fraud they have both perpetrated against themselves in believing they are better than average. Willy, however, cannot or will not accept this truth. He clings to Ben, a delusion, a ghost that speaks of ideal success.
Beyond his symbolic function in the play, Ben also serves to offer an insight into Willy's mental state. Ben's presence articulates Willy's lack of mental control. Ben also expresses Willy's notion of dream of success and, by contrast, Willy's actual failure to achieve that dream.