There are plenty of online photos and videos showing that McDonald’s fries do not decompose when left out for a long period time. Then there is a voice from public that it is because McDonald’s fries are full with chemicals and perspectives, while McDonald's Canada gave another explanation.
Here's the explanation:
“The reality is that McDonald’s hamburgers, French fries and chicken are like all foods, and do rot if kept under certain conditions. Essentially, the microbes that cause rotting are a lot like ourselves, in that they need water, nutrients, warmth and time to grow. If we take one or more of these elements away, then microbes cannot grow or spoil food.
In the example of a McDonald’s hamburger, the patty loses water in the form of steam during the cooking process. The bun, of course, is made out of bread. Toasting it reduces the amount of moisture. This means that after preparation, the hamburger is fairly dry. When left out open in the room, there is further water loss as the humidity within most buildings is around 40%. So in the absence of moisture or high humidity, the hamburger simply dries out, rather than rot.
With moisture loss, we take away an element required by microbes to grow and cause spoilage. So to spoil a McDonald’s hamburger, we simply need to prevent the moisture loss. This can be done through wrapping it in cling film to prevent moisture from escaping, or storing it within a high humidity environment, such as a bathroom (notice black mould on your bathroom windows but not in your bedroom). If you try doing the same experiment with a homemade burger with similar moisture content as a McDonald’s hamburger and under similar conditions, you’ll probably get the same results.”
Also, some experiments form Food blog A Hamburger Today verified that the phenomenon of undecayed burgers isn't unique to McDonald's.