Are you talking about morality or common practice? Morally you shouldn't claim someone is an author when they're just giving you money. Common practice in biomedical research is to do so without even telling them about the paper. But as last author, not first.
I was naively thinking they had that in their grant agreements. As a computer scientist I know that people end up on the paper that didn't write it. But I haven't had the case where people didn't know they were on it.