I'm not sure about Wal-Mart, but I'm pretty sure McDonald's is franchised, meaning that it's very possible for an individual restaurant to be unprofitable even when McDonald's as a whole is raking in that Big Mac money.
Even in non-franchised businesses, if the cost of a location exceeds its revenue, then that location is no longer profitable, and therefore could very well be shut down or at the very least downsized.
Even in non-franchised businesses, if the cost of a location exceeds its revenue, then that location is no longer profitable, and therefore could very well be shut down or at the very least downsized.
Either way, people lose their jobs.