I wonder why the old advice was being given if it was so wrong? If nobody understood what to do, shouldn't there have been no advice instead of something harmful?
Lots of things kill infants that harm children, so keeping them away from things that harm some children probably seemed correct. The mechanism for allergy development wasn’t well known and it seems reasonably to avoid it in case it was genetic or something and would cause a hard to treat allergic reaction in the infant.