And enforcement is pretty lacking in itself. Most people won't report it to the authorities that they got the runs from some ice cream, the authorities will only hear about it when dozens of people arrive at the hospital with the same symptoms, and even then most public health departments have already been understaffed prior to COVID to follow up on the hospital reports and conduct inspections.
What McD/Taylor are doing here is, as fucked up as it is, the only meaningful way they can make sure they're not labeled a public health risk.
There is a chain of custody, paper trail, spare parts certification, logging... For example if there is a heat ex-changer that sometimes does not work, it may cause a lawsuit. McDonald (and insurance companies) wants to be able to sue ice cream machine manufacturer.
I also want to be able to replace any "suitable" parts in my car, but sadly government does not allow that! Remember, when everyone lost their shit with Volkswagen "cheating" in their software?
Not the right to break health and safety laws.