McDonaldland, the setting of McDonald’s marketing efforts throughout the 1970s and ‘80s, was a magical place populated by talking cheeseburgers, fry goblins, and whatever Grimace was supposed to be. While it may seem like the stuff of delirious fantasy, McDonaldland stayed grounded in one regard: time travel. In fact, if you want to better understand a specific theoretical aspect of time travel endorsed by Carl Sagan and Stephen Hawking, look to McDonaldland—specifically, Mayor McCheese.

Between 1971 and 1985, Mayor McCheese served as the mayor of McDonaldland. While McCheese was a integral part of McDonaldland in its early years, he was slowly phased out and didn’t appear again in any official capacity for McDonald’s (save a single Sears advertisement) until 1999. Because he is a politician, there naturally was a scandal involved.

In 1970, ad agency Needham Harper & Steers approached Sid and Marty Krofft, the creators of H.R. Pufnstuf, about using characters from the hit children’s show for a campaign they were pitching to McDonald’s. Before any progress could be made, the agency told the Kroffts that the campaign had been canceled. However, the next year, McDonald’s aired the first of their McDonaldland commercials, and the Kroffts believed that the feel and design were directly plagiarized from the world they had created for H.R. Pufnstuf. They sued the McDonald’s Corporation, and much of their case revolved around Mayor McCheese’s similarities to Pufnstuf.

The case went to trial in 1973, and lawyers for McDonald’s argued Mayor McCheese was sufficiently different from the Kroffts’ creation:

"'Pufnstuf' wears what can only be described as a yellow and green dragon suit with a blue cummerbund from which hangs a medal which says 'mayor'. 'McCheese' wears a version of pink formal dress—'tails'—with knicker trousers. He has a typical diplomat's sash on which is written 'mayor', the 'M' consisting of the McDonald's trademark of an 'M' made of golden arches."

Neither the jury nor an appeals court bought this defense, and the case was settled in 1977 with the McDonald’s Corporation ordered to pay damages to the Kroffts. McDonaldland had become extremely popular by then, but it was around the time of this legal headache that McDonald’s started to move away from the campaign. One of the first casualties was Mayor McCheese, who stopped getting speaking roles in ads and was seen less and less until 1985, when he appeared in his final commercial for the fast food company (it also starred Mary Lou Retton).

Mayor McCheese appears in the McDonaldland universe only once more, and his presence is thanks to a time machine (and theoretical physics).

In 1998, McDonald’s commissioned Klasky Csupo, the production company behind popular shows like Rugrats and Aaahh!!! Real Monsters, to make a series of direct-to-video cartoons based around a rebranded Ronald McDonald (he was skinnier and had sideburns). Six episodes of The Wacky Adventures of Ronald McDonald were released on VHS. In the penultimate episode, “Have Time, Will Travel,” Ronald and company discover a time machine. It is through this time machine that we finally reunite with Mayor McCheese:

“This was part of McDonaldland … in the ‘70s,” Ronald says as he steps out of the time machine and into a disco where Mayor McCheese is partying.

“Well I’ll be a burger in bellbottoms,” Mayor McCheese says. “I just learned the latest dance craze: The Hustle!” McCheese then performs a rather accurate version of The Hustle for 15 full seconds.

Now, if you are familiar with Stephen Hawking’s work on space-time and how it relates to humanity’s potential to engage in time travel, you will know that this encounter with Mayor McCheese recalls a major paradox: “If sometime in the future we learn to travel in time,” Hawking writes, “why hasn't someone come back from the future to tell us how to do it?”

According to Hawking, there are plausible explanations for this:

“A possible way to reconcile time travel, with the fact that we don't seem to have had any visitors from the future, would be to say that it can occur only in the future. In this view, one would say space-time in our past was fixed, because we have observed it, and seen that it is not warped enough, to allow travel into the past.”

Carl Sagan made a similar argument during an interview with NOVA in the 1990s: “Maybe backward time travel is possible, but only up to the moment that time travel is invented. We haven't invented it yet, so they can't come to us. They can come to as far back as whatever it would be, say A.D. 2300, but not further back in time.”

So, time travel may indeed be possible, but you can’t go back any further than the point at which the time machine was first invented. This kind of thinking would make Ronald McDonald and Mayor McCheese’s disco reunion impossible unless the time machine had already been invented by the 1970s. Well, it just so happens that McDonaldland did have a time machine, and they had it at the precise moment for this scenario to be plausible.

In the 1975 McDonaldland commercial “Time Machine,” Ronald, McCheese, and Grimace encounter a time machine. The year is important here. When they go back to the ‘70s in The Wacky Adventures of Ronald McDonald, Mayor McCheese says he “just” learned a new dance, "The Hustle." And when did Van McCoy release his smash hit single “The Hustle”? You guessed it: 1975.

Mayor McCheese’s return is only made possible because McDonaldland adheres to the strict laws of time travel. It's the reason two pieces of McDonald’s marketing ephemera made nearly a quarter-century apart and by different creative teams could remain so in sync. It also could be why McDonald’s wasn’t sued again, for this was the same Mayor McCheese from 1975, two years before the lawsuit with the Kroffts was settled.

Science is so elegant when it's simple like this.