The Church gives the name Purgatory to this final purification of the elect, which is entirely different from the punishment of the damned. 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’. [II Macc. 12:46]. 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”
-CCC #1030-1032
“So be perfect, just as your heavenly Father is perfect.” - Jesus
Matthew 5:48