Cashflow from renting to a franchisee must be fantastic. You pick the locations and the decor. If the business does well you prosper, but if the business does poorly you're insulated from the downside, the rent is due either way! If the franchisee can't hack it you repossess the building and rent it to some other suc^H^H^Hfranchisee.
McDonald's is invested in franchisee's success, it wouldn't be a great business otherwise.
It's actually hilarious sometimes. The business models that generate most scorn and incredulity on HN are the straightforward ones. They convert labor pretty much directly to a very basic product with a clear demand by society, that can't possibly be profitable, are we sure it's not actually a front for Real Estate or AI or Tax Evasion?
I'm sure real estate is the primary business model of McDonald's but franchisees wouldn't be paying the rent and fees if the restaurant model itself wasn't very profitable.
Most restaurants in Europe generate an average of 250k in net cash flow per average restaurant, that's few years of work before ROI.
It's very easy to lose money running a McDonald's (or any restaurant) if you do not keep a very close eye on all your controllable expenses. Most franchisees need multiple stores to cover all the overhead and actually be profitable.
McDonalds's Corp, the landlord, is in a better position but they also don't want to see stores fail, it's bad for their image.