It is first a mystery so no one really understands these things fully this side of the grave.
Perhaps the communal nature of sin may aid your understanding. We sin not just against God but also our neighbors, for example if you steal your theft harms another, maybe many in a chain of events that you caused. We are unable to absolve ourselves, in the early church confession took place many times in public because the sin of individuals effects others. The incarnational aspect of our faith shows us that the effect of sin requires God to take on flesh. He requires us to love one another, breaking the bond with our neighbors requires repair as well.
So maybe the soul waiting for another's prayers broke the bonds of charity with the ancestors of that person praying.
Faith is a gift and when we don't understand we cling to the truths of God more tightly.