The term "purgatory" is not in the Bible, but the teaching is. Just like the term "Incarnation" and "Trinity" is not in the Bible, but the teaching is. It is not a "Catholic invention" but part our Jewish heritage, although the Jews do not use the term "purgatory".
Jews do believe in a purification (a purgation) which takes place after death. When a Jewish person's loved one dies, it is customary to pray on his behalf for eleven months using a prayer known as the mourner's
Qaddish (derived from the Hebrew word meaning "holy"). This prayer is used to ask God to hasten the purification of the loved one's soul. The
Qaddish is prayed for only eleven months because it is thought to be an insult to imply that the loved one's sins were so severe that he would require a full year of purification.
The practice of praying for the dead has been part of the Jewish faith since before Christ. Remember that
2 Maccabees 12:39-45, on which Catholics base their observance of this practice, shows that, a century and a half before Christ, prayer for the dead was taken for granted. Unlike Protestantism, Catholicism has preserved this authentic element of Judeo-Christian faith.
Do devout Jews believe in purgatory? | Catholic Answers
You can dismiss 2 Maccabees as uninspired if you want, I don't care. But to ignore it as Jewish history is severing your own roots.
The purpose of purgatory is to purify us so that we are thoroughly holy and thus fit for heaven. It is part of the process by which we gain "the holiness without which no one will see the Lord"
Heb. 12:14
But the process of purification doesn’t start in purgatory. It starts in this life, and in Protestant circles it’s known as
sanctification. (Catholics also use this term, though not always in exactly the same fashion; the term
justification is also used in both circles though not always in the same ways.)
Now, where does sanctification come from? Is it something God gives us by his grace or something that happens apart from his grace?
Protestants will agree with Catholics that it is the product of God’s grace in our lives.
But why is God giving us this grace? Is it because of what his Son did on the Cross or is it separate from that?
Once again, Protestants will agree with Catholics that it is because of what Christ did on the Cross that God sanctifies us.
So sanctification–the process of being made holy–is something that happens to us only because of Christ’s death on the Cross.
Sanctification–including the final stage of sanctification in purgatory–
thus presupposes the sufficiency of Christ’s sacrifice. It is so sufficient that it is not only enough to justify us but enough to sanctify us as well. The difference is that (to use language in a Protestant way) justification is something that happens at the beginning of the Christian life while sanctification is something that happens over the course of it.
Purgatory & The Sufficiency Of Christ’s Sacrifice
The statement that I see too frequently
"purgatory denies the all sufficiency of Christ" is really dumb.