When is a McDonald's not an actual McDonald's? When it's a television set used to film commercials!
Turns out, McDonald's uses a fake location hidden in an industrial park to film a majority of its commercials and scenes of the chain featured in movies. This also marks the only valid excuse for a McDonald's location to not have a functional ice cream machine. You could make the argument that it's technically not fake McDonald's, just one not open to the public, but I'm assuming the kitchen isn't fully functional (food seen in many restaurant ads is fake) so it's really more of a facsimile of a real one in my book.
According to Roadside America, the fake McDonald's is located out of the way in an industrial park at 17030 Green Dr in the City of Industry, California. As you can see in the photo above, it's fenced in and access is restricted to production vehicles, commercial actors, and crewmembers. This building and the office next door are officially known as the McDonald's Production Studio.
Most of the time you see a McDonald's tv ad, it was filmed here. Usually, companies just rent a soundstage on a studio lot, build an interior set, then it's dismantled as soon as filming is completed. I'm guessing McDonald's corporate wants consistency with the ads they're filming almost constantly (especially for seasonal items), so it makes sense they'd just build a location near LA to use for ads full time.
Check out some of the other pictures of the McDonald's Production Studio below! Notice the sign that says "crew and talent parking only." If you ever get cast in a Micky D's ad, now you'll know where to go!