Offering a Mass for the dead is an ancient Catholic tradition that helps souls on their way to heaven. St. Ambrose exhorted the faithful by preaching: “we have loved them during life; let us not abandon them in death, until we have conducted them by our prayers into the House of the Lord.” To have a Mass said for the repose of the soul of someone who has passed away—even a non-Catholic—is a comforting expression of faith and love.
An individual may ask a priest to offer a Mass for several reasons: for example, in thanksgiving, for the intentions of another person (such as on a birthday), or, as is most common, for the repose of the soul of someone who has died. One must never forget the infinite graces that flow from the Sacrifice of the Mass which benefit ones soul. Pope Leo XIII in his encyclical "Mirae caritatis" (1902) beautifully elaborated this point and emphasized the connection between the communion of saints with the Mass: "The grace of mutual love among the living, strengthened and increased by the sacrament of the Eucharist, flows, especially by virtue of the Sacrifice [of the Mass], to all who belong to the communion of saints. For the communion of saints is simply ... the mutual sharing of help, atonement, prayers and benefits among the faithful, those already in the heavenly fatherland, those consigned to the purifying fire, and those still making their pilgrim way here on earth. These all form one city, whose head is Christ, and whose vital principle is love. Faith teaches that although the august Sacrifice can be offered to God alone, it can nevertheless be celebrated in honor of the saints now reigning in Heaven with God, who has crowned them, to obtain their intercession for us, and also, according to apostolic tradition, to wash away the stains of those brethren who died in the Lord but without yet being wholly purified."