To me it’s a foreshadowing of both judgement and purgatory.
Our works will be judged, and they’ll be seen for what they were. If for example, we tried to help other people, however well or badly, because we really wanted to serve God through that service, then that work will be accepted. Our circumstances will be taken into account as well - the poor widow received Christ’s commendation for her two mites, which was all she had to live on, whereas the rich were seen as giving relatively little. She had literally poured herself into the temple treasury - the rich had given a bit of the loose change out of their wallet.
But if we gave money because we wanted to big note ourselves (some corporate sponsorships come to mind here, particularly in high profile sporting events), then that work will be burnt up, since our motive would have been self serving.
Likewise we ourselves will be purified by fire, aka purgatory. It may not be explicitly called that in Scripture, but the Trinity is not called that in Scripture either, nor is the Papacy, the Lutheran Denomination, the Westminster Confession etc.
But Purgatory is certainly implied, and i believe this is one place in Scripture where we are given a clear hint that it’s for real.