Simple conomy of scale. McDonald's buy chicken in bulk from vendors, and get a better deal than Safeway/wherever you shop does, they get industrial bulk handing deals and yeah they have to pay for employees to cook the food, but that's amortized over all the other customers. So it can be cheaper, the same way that it's cheaper to get oil out of the ground, refine it, do a bunch of chemistry to it, form it into plastic knives and forks, make a box for it, decorate that box, put the cutlery into the box, ship that box halfway around the world, put it in a store, and all of that's still cheaper than getting someone to wash a metal fork for you to eat dinner with.
What blew my mind is when someone explained to me the cultural difference with some places in south east Asia. In the US, eating out at restaurants is what rich people do. But in certain places in south east Asia, having a kitchen, having appliances like a fridge, having electricity for them, having dining space, having the time to go to the market to haggle with vendors, all of that adds up so it's the rich that can afford to eat at home, and everyon else eats out. So it's location dependent.
What blew my mind is when someone explained to me the cultural difference with some places in south east Asia. In the US, eating out at restaurants is what rich people do. But in certain places in south east Asia, having a kitchen, having appliances like a fridge, having electricity for them, having dining space, having the time to go to the market to haggle with vendors, all of that adds up so it's the rich that can afford to eat at home, and everyon else eats out. So it's location dependent.