Catechism of the Catholic Church (no. 1032): prayer for the dead is one of the spiritual works of mercy.
1032 This teaching is also based on the practice of prayer for the dead, already mentioned in Sacred Scripture: “Therefore [Judas Maccabeus] made atonement for the dead, that they might be delivered from their sin.” From the beginning the Church has honored the memory of the dead and offered prayers in suffrage for them, above all the Eucharistic sacrifice, so that, thus purified, they may attain the beatific vision of God. The Church also commends almsgiving, indulgences, and works of penance undertaken on behalf of the dead:
Catechism of the Catholic Church (no. 1032): prayer for the dead is one of the spiritual works of mercy.
I disagree with that particular teaching. I’m not Catholic. I do not believe Mary died a virgin. I do not believe Mary was perfect. I am not a Catholic. I agree with much of what that particular organization teaches, but I also agree with much of what Jehovas Witnesses, Mormons and pentacostals teach. But I disagree with all of them on some things.
For me, Christianity is about two things: My relationship with my Creator and my relationship with my fellow man. The latter is actually a subset of the former.
I have no relationship with dead people. I consider ALL of them merely flawed sinners such as myself. Now, I believe that after the resurrection we will have a relationship in eternity in our Lord’s presence, but everything in its time.