A priest friend of mine always makes a point of visiting any non Catholic cemetery he happens to be passing in order to say an eternal rest or three for those buried there. That is an admirable practice.
Those souls have no one to pray for them and they carry the stain of their earthly sin until such time that recompense has been judged to have been made.
They are branded with the infection of sin; sin that needs to be eradicated just as an infected wound is cauterized, by fire.
And to carry the metaphor still further, iron loses its properties (sin) in fire and then, if heated to the correct degree and annealing takes place, it becomes harder and stronger then before.
It becomes perfect just as our souls will become perfect so that we may enter into God's kingdom for all time.