And it's worth observing that McDonald's is sort of structurally obliged to be doing all that. It's a trap that many very large companies find themselve stuck in and that in many cases becomes the poison that feeds their ruin.
If McDonald's didn't "keep up with the Joneses" as their both their peers and upstart-darling competitors dressed up their menus and digitized their engagement, they'd be giving up their prestige as a defining brand in fast food and would set themselves down the road to being the next generation Arby's, A&W, Dairy Queen, etc -- nostalgic and lingering, perhaps, but no longer a global titan of their current scale.
They may be playing out a losing strategy as you point out, but they also may not have had a winning strategy; at least not at the corporate level. And for corporate, this one has the advantage of extracting more short-term money from operators along the way, so it's not entirely a surpise that it's the one they'd run with.