Earlier quoted context omitted.
Because losing 14% of ice cream sales beats getting sued for poisoning people and losing their reputation for good food safety. If you can't trust McDonalds to be a safe choice, why would you go there at all?
Did you watch the film? The idea is that McDonalds are knowingly letting another company overcharge their franchisees, it's not about safety. Supposedly other fast food chains use the same machines without these problems.
I can see how McDonald's would make a strategic choice to lower their time to serve a customer in exchange for a machine that is broken part of the time. They actually track and chastise workers based on taking more than some absurdly short amount of time to serve a customer. It seems like a corporate strategy for them, and this is in line with that.