
William W. answered 01/29/22
AP Biology teacher with molecular genetics experience
You raise an interesting point as the immune system doesn't make antibodies until it is exposed to an antigen. There should be no worries about the first bee sting a child gets, for example.
Blood transfusions are, hopefully, a rare occurrence in a person's life, so prior exposure to non-self blood type antigens is uncommon. It turns out that the carbohydrate A and B antigens (or something similar enough that it makes no difference) are present on yeast and pollen grains that easily make into the digestive system of the newborn. The immune systems of babies with type O blood respond to these molecules in the gut as "non-self" and generate long lasting antibodies.