During the Middle Ages, Christians believed they needed to do good works to get into heaven. Remember that this was before the Protestant Reformation, so most Christians belonged to "The Church" -- which was the Catholic Church at this time. Even though it says in Ephesians 2:8 that we are saved by grace, not by works, this idea was not prevalent until after the Protestant Reformation. Remember that during the Middle Ages, popes were corrupt, and church leaders were selling indulgences. This is what reformers, notably Martin Luther, were so outraged by. Initially, they did not want to break way from The Church, they wanted to "reform" it - hence the name, "Reformation".
In any case, when Martin Luther nailed his 95 Thesis onto the door of the cathedral in Germany, one of the problems he had was that the church was not preaching Scripture correctly. Men are expected to do good works ONLY after being saved, he believed, and only because it built up God's kingdom on earth. Otherwise, men would brag, like it says in Ephesians. Men are saved only because God saves us, not because of anything we can do.
So, when Everyman is called to give an account of his good works, this was a popular, accepted and "correct" idea - something that every Christian must do - in the mind of a Middle Ages believer. If you did enough good works, you not only would get into heaven, but you would get to live in a pretty good "mansion" while you were there.
The entire allegory is revealing about Christian beliefs during the Middle Ages. The Judeo-Christian religion is based on heavenly rewards for earthly behavior (as is the Muslim religion.) As the common earth-bound measurements of happiness desert Everyman, such as his health, his kin, his friends, etc., it becomes more and more clear that the only lasting “companion” to the grave are those times when we give of ourselves and overcome our selfishness and self-comfort. Our good deeds, those times when we truly heard Christ’s message to us human souls, will accompany us to “the grave” and will be the measurement by which our eternal destiny will be determined. This Christian message is made dramatically clear when Death acknowledges their value. The dramatic format also is evidence that much teaching at the time was done without a need for literacy.