Perhaps to avoid confusion, Catholic’s purgatory is a state of purification before one’s enters heaven.
It is not a punishment or literal fire, we do not know that and we do not need to.
What we need to know that nothing unclean will enter heaven. We are made clean by the sacrifice of Jesus if we repent. For some of us, we may never repent enough; there is always that small weaknesses, imperfection and bad habit that we have never let go but at the same time still believe in the redemption of the Lord. For that we need to be purified after life. It would be such a cruel thing to send us to hell, wouldn’t it?
For those of us who are much better and being perfect, they will go straight to heaven.