I see it like this:
if the person believes in god existence then they will thank god and feel that there was some sort of divine intervention.
But if the person doesn’t believe that there’s a higher being, then that person will probably feel that human kind is not that bad as so many feel that we are.
We all know what suffering can be like on our own skin so we are prompted to help others based on our own knowledge of pain.