Okay sun lets try this very slowly.
Having an allergic reaction to something someone else is eating is more likely on a plane because of the recycled air.
Having an allergic reaction to something on a plane is far FAR more dangerous due to the additional time it will take to get to a hospital.
THEREFORE it makes sense to ban nuts on flights, even though you don't have any intention of generally banning them everywhere else.
Do you get it yet?
Would it help to consider the case of fireworks, blow torches, or non-safety matches? They are generally okay out there in the world....but not so much on planes...where any ignition could lead to catastrophe.