What you say is correct from al the perspective of advertising and corporate budgeting. From the perspective of charitable work, which they invited by loudly proclaiming "look at our charity", it is appalling.
They weren't touting their charity. They were touting their charitable franchise owners. That's a major distinction.
Imagine if Google made an ad saying "We donated $50,000 to charity. Look how generous we are. Come work for Google". That would be nonsensical.
Now imagine if Google made an ad saying "Joe is a Googler. Joe donated $50,000 of his own money to charity. Look how wonderful our Googlers are. Come work for Google alongside people like Joe." Very cheesy, but it makes a lot more sense. Domino's ad is the latter, not the former.
Some say that giving money to marketing companies, and the people they employ, is a bit of charity, for what other function could those people possibly serve in society?
Why is it appalling? Would people prefer the charity get $0 and the advertisers get $50.1M? Or the shareholders get an extra $0.1M?
Personally, I find all non anonymous charitable donations in poor taste, and that reflects badly on Dominos for someone thinking like me. But for those receiving charity, surely any amount greater than $0 is enough, since it is a charity.
Ironically enough, the most effective charities often have significant marketing budgets. You can't do any work if you don't have any money to do it with.
Also, nobody is under any impression that Dominos is a charity and not a pizza joint.
IMHO most charity work is kind of scam anyways. Sure you've got some proportion really out there doing good and helping desperate people, but most of them seem like ego trips and tax scams for rich people. In most cases, at least in democratic nations, I think it would be in our interest to take all that money and give it local and national governments to fully fund education, social services, environment causes, animal control, healthcare, etc. By letting charities handle large chunks of those, we essentially allow rich people to dictate public policy.
The problem is that corruption is widespread throughout most of the world, and especially places in poverty. A stable, just society is able to bootstrap into relative wealthy pretty quickly, so most of the countries that have the largest need of aid, also tend to have the greatest issues with government trustworthiness.
As an aside, some charities are scams, but many are not. There are tools you can use to determine which ones are trustworthy, but some basic common sense goes a long way too.