I used to believe this too. I was corrected and informed that if it collected as a donation it is not the company making the donation and they can not gain tax benefits from it. They also aren't paying a sales tax on that money either.
The benefit is exclusively the good PR from arranging the donation, which to be fair, they did. If the donation came through a credit card they may have covered the ~3% transaction fee, although they could potentially write that off for the portion that the donation increased the fee by.
That make complete sense, thank you for correcting me.
I think I was conflating the practice of matching donations with this, as both have a corporation encouraging you to donate to the charity they choose.