There are a lot of museums, historic sites, schools, etc with names of donors on plaques hanging on some wall, and many of them attribute very large donations to "anonymous donor."
Also: it's possible to make an "anonymous" donation and let your friends and family know you're doing it. That way, to the people you know and want to impress you seem both like a generous philanthropist and a humble private person.
My point is, it's possible to read any action in a bad light and assign a bad motive to it. In my view giving money to worthwhile causes is good, even if you're doing it to rehabilitate your image or make yourself look good