There are two problems with this argument.
First, we do not believe in the labor theory of value. Time has a value. Risk has value, land has value, and there is also value in nature, so if you were to distribute all the profits solely to labor, you would have only labor and no capital.
That means no equipment, no burgers, no fries, no land, no buildings, no cash registers, no working capital, etc. Just a bunch of people standing around, not even being able to work because tools are required to work and the moment someone suggest paying for the tools necessary to do work, someone like you pops up and starts complaining that there must be no payments for capital, all payments must be only for labor, and so no tools are ever purchased.
No land is purchased. No money is borrowed to pay for any expenses, etc.
The second problem is opportunity cost. McDonald's market cap is 180 Billion dollars, and it earns about 5 Billion per year for a yield of ~2.7%. But this is a risky return. Alternately one can invest in 30 year treasuries that are guaranteed and earn 1.86%. So that corresponds to a risk premium of 1% and a real rate of ~1.8%. In real terms, the risk-free rate is actually negative and the McDonald's earnings yield is approximately zero. Thus the earnings accruing to McDonalds are basically just enough to make up for the loss of the value of the investment due to inflation, so you'd get your original money back, with a healthy dose of risk.
That is charity. You should be on your knees thanking investors for supplying the 200K workers of McDonalds with 180 Billion dollars of capital that allows them to have jobs while the investors are getting basically nothing back in exchange for taking on that risk.
Of course these yields are temporary. Investors may not be getting anything back now, but long term, these types of yields are unsustainable and they will go up. Investors do need to get something back for their investment otherwise the investment wont be made.
And getting back just the original amount invested is generally insufficient to motivate investment and is characteristic of a dysfunctional economy that is unpleasant for workers. When yields are so low as to just match inflation, that's when you see things like housing bubbles as investors turn around to buy up real assets like land because there is no point in investing in risky ventures, and that is when more people who don't understand the world start moaning about how unfair all the expensive housing is, while with the other side of their mouth they advocate for zero interest rates because payments to capital are "bad". We would like to live in a world where ventures are funded, where investment in productive capital is funded. We like the idea of SpaceX and Tesla and mRNA vaccines and M1 chips. We like investment. But that means that the investment must be more profitable that merely buying land and holding it to get back your money in inflation adjusted terms. And the greater the reward for investment, the more investment that will occur.