As one commented mentioned these "nut allergies" can be psychosomatic, where the mind is literally triggering the physical reactions based purely on expectation.
On the other hand "nuts" including peanuts are typically processed in the same facilities, so cross-contamination is real too.