It's definitely amoral. But it's also highly inefficient - it means that if everyone takes Oracle's approach then only charities with high levels of positive publicity get charity dollars.
Those charities who cannot generate lots if positive press can't help fund important research. Ironically sometimes research that crosses into another field and benefits another bug if research bring done.
Personally, I was asked to submit suggestions of charities to Larry. But it was made clear to me that there had to be some benefit - preferably large ROI, since small ROI wasn't worth Larry's time. And, while it was possible to occasionally ignore ROI, there had to be a good reason to do so (in particular, if I could find something that Larry personally cared about or had the potential to have large ROI soon or influence a particular CEO who might be a customer.) So when I made a list of charities I thought were worthwhile, I couldn't justify submitting any of them to Larry. So I never got more involved with our charitable giving. What could have been the opportunity of a lifetime simply left me more jaded about our Capitalist system.
Agreed, not saying it's an ideal or even warranted approach but it's also not a net negative, companies don't really have to do anything at all if they don't want to, though in the UK we have this concept called "Corporate and Social Responsibility" but afaik that only applies when you want some kind of funding/grant that is partially public sector.
You could (and people do) run a company absolutely ruthlessly applying only the metric of "What is the absolutely best way to make money".
Capitalism isn't nice it's just relatively efficient compared to other systems.
It's not that different than celebrities endorsing a charity for "free", they give up some time which gets positive PR and the charity gets the benefit of raising against their events.