Guess we’d all better stop using cars then, since the outcome of driving places is uncertain. Planes, too, boats, walking, eating (even without allergies you might choke!). I’d suggest laying perfectly still in bed, but then you might get hit by a meteor or something.
You’re never going to get 100% certainty in any situation. Just because some people have a risk of food allergy that you don’t doesn’t mean that they’re stupid to not reduce their risk to exactly the same level as yours, nor that people who attempt to cater for their needas without dedicating their business to that purpose are foolish. This particular instance was negligence; restaurants should as a matter of course be aware of their food’s potential to trigger at least the common food allergies, and employees not familiar with it off the top of their head should check with someone there who does know. At that point they’ve taken enough steps that mistakes beyond that point are either negligence by individuals involved in the process or the inevitable nature of not being able to reduce risk to 0.