How Can the Merit of Torah Study Possibly Assist the Dead Who Had No Part In It?!

The question is obvious (here is an overview).

I didn’t delve into the topic sufficiently, but I just saw in Rabbi Yehuda Petaya’s “Ruchot Mesaprot” (toward the end) that it doesn’t. Instead, one prays for the deceased, like David Hamelech prayed to save Avshalom from Gehenom. (And the Torah learning presumably gives merit to the one praying so his prayers are answered.)