If McDonald's was profitable, they wouldn't try to franchise it. That's what this is. You take on operating costs and you understand your local market. They own the brand.
actually most franchise restaurants are not profitable and eventually go out of business. subway is famous for being basically a pyramid scheme that only makes money by fleecing aspiring restaurateurs. mcdonald's is an exception because they are primarily a real estate company and commercial landlord.
From what I understand, McDonald's franchisees can make 5-15% of gross revenue of their location. That's a decent return, along the lines of other investments. As with all investments, you may lose too.