McDonald's is a real estate business that not only depends directly on people buying burgers, but on the indirect value of traffic to their location.
From If McDonald’s Is A Real Estate Business, What Business Are You In?:
In 1954, aged 52, Ray Kroc joined McDonalds as a franchise manager. 10 years later he bought the entire business for $2.7m.
He was an incredibly successful businessman, building McDonalds from a small chain into the most successful fast food operation in the world.
A story is told about some advice he once gave to a class of Harvard MBA students. He asked them all, “what business is McDonalds in?”
“Restaurants!” “Hospitality!” “Supply Chain!” “Franchising!” “Entertainment!”
“No!” Ray laughed and replied to each student.
“Ladies and gentlemen, I’m not in the hamburger business. My business is real estate.”
And from Business Lessons From Ray Kroc "The Founder" -- McDonald's Story
Despite a handful of successful franchises up and running, Kroc is nearly out of cash. His slice of the business is tiny, and the bank is threatening to foreclose on his house mortgage.
A fortuitous intervention by Harry Sonneborn, another fast food executive, steers Kroc in the more lucrative direction. “You’re not in the hamburger business, you’re in the real estate business,” Kroc is told. Keaton’s monumentally expressive face registers the logic, and he pivots into buying up the real estate which he leases back to the franchise.
The real estate corporation McDonald's should find such a franchise economically viable if the property provides value to them. Part of that value comes from the lease, and part from the increasing value of the property. It needs to be worthwhile to the operator in order to afford the property lease. It needs to be worthwhile to McDonald's if the value of the lease and the value of the property combine for more income than their expenses (cost of the property, taxes, insurance, etc.)
The value of the lease depends on the volume of business that you asked about. The value of the property depends in part on that, but also the value of the land itself. That is, it would depend on other businesses building nearby, so the desirability of the land increases as more and more businesses want to build close to McDonald's. Why do those businesses want to build nearby? Well, to get the overflow from McDonald's, for one. For another, traffic. (Hey look, a battery shop! I should get some AA batteries since I'm going by there anyway...)
Overall, yes, there's some critical mass at which the number of people make the restaurant profitable to the operator. But it's more complicated than that for McDonald's as a corporation. I think that any projections at this point in time will prove to be wildly inaccurate when the idea becomes reality, even with substantial consideration of the issues involved. Nevertheless, that's not a deal-breaker for your world, perhaps, if you can leave plenty of wiggle-room in your expression of it.
And as others have mentioned - PR! A McDonald's will be talked about by a myriad of outlets. The value of that depends not on the population of Mars, but of our Solar System as a whole, or at least, the population of all worlds with a McDonald's.