I’ve already tried to answer that, and I don’t know if I can do so any better than I have already. But I’ll give it one more shot.
If I am doing something for you that I think will help, but that you think is totally useless, might you not be comforted by the thought that I care enough about you to do something that I think may help, even if you are convinced that it will not?
Suppose you have lost something—your keys, your mittens, whatever. You’ve been at my house relatively recently, so I offer to look around at my house and see if they are there. “No, I’m sure I didn’t lose them there,” you tell me, although you are unable to explain how you know for sure that they couldn’t be there.
I, on the other hand, am not so sure that they couldn’t be there. Maybe I remember seeing you lay them down when you were at my place. Maybe I have no reason to believe they could be there other than that you haven’t found them anywhere else yet.
If I tell you, “I’m going to go ahead and look anyway,” it’s not unreasonable for you to be grateful that I care enough about you to take the trouble to look, even though you believe it’s a wasted effort on my part. (It might also be not unreasonable for you to be a bit upset at me for not believing you when you said you were sure they weren’t there. Both feelings could even coexist at the same time.)
One more thought: It can be difficult to imagine what it’s like to believe something that you don’t, in fact, believe. And this goes both ways. If a Christian (or other theist) offers to pray for an atheist, they may know, intellectually, that the atheist doesn’t believe in the efficacy of prayer, but they may not really understand that on a deep level. And the atheist being prayed for may not fully understand that, from the point of view of the pray-er, they’re doing something that they genuinely believe to be real and helpful.