The rich donate because they are protecting their reputation and for the sake of their own self image (everybody needs to be the hero of their own story).
The only ones who can manage that and not be charitable are the utterly self deluded (e.g. Trump).
Don't expect them to donate a damn thing if they are lauded as heroes. Bill Gates likely wouldn't be giving his money away at all if it he didn't feel the need to repair his image in the 2000s.
Same reason all of the robber Barrons were philanthropists - do you think they would have been more charitable if they had been cheered on instead of villainized? Like hell they would.