To ruthlessly simplify, purgatory is part of heaven. To be in purgatory is to be in heaven. Purgatory is the mud room for Christ’s mansion with many rooms. (I am not trying to be humorous, just searching for a vivid direct analogy.)
When a person gets to Purgatory they know they are heaven-bound.
Reparation must be done there for what the person failed to do on earth.
Very simple since only pure souls may enter heaven.
A very good analogy I believe. Thank you.