Immunity is something that takes several years to develop (about 7 years) and is a gradual process. Breastmilk can play a vital role in this and again its rubbish to say that once a child reaches a certain age properties in b/milk 'stop working'... it's just that as the baby gets older it is able to protect itself against infection better than a newborn.
I found this which discusses immunity but doesn't discuss older babies:
Immaturity of the neonatal immune system predisposes the infant to development of infections during the first year of life. Infants who are breastfed have been shown to have a lower incidence of certain infectious diseases when compared with formula-fed infants.1-3 Human milk contains factors that have the potential to protect infants from infection and disease caused by many pathogens. Some of these putative protective factors in human milk include pathogen-specific IgA,4-11 oligosaccharides,6,12 glycolipid,13 and mucin.14 An association has been established between the presence of these compounds and either broad-based protection or specific protection.4-14
Several studies have reported that human milk enhances development of the immune system in breastfed infants compared with formula-fed infants.15-21 Reports of enhanced humoral response include increased serum antibody titers to Haemophilus influenzae type b polysaccharide (Hib),16 oral polio virus (OPV),17 and diphtheria toxoid (DIP).17 In addition, secretory IgA concentrations, both total and subclass IgA2, increased more rapidly in breastfed infants.20 Modulation of immune response to an infectious agent or vaccine antigen by specific components of human milk is of potential benefit to breastfed infants, and may benefit infants who receive formula containing these components.
Nucleotides are one of the components of human milk that have been identified as affecting immune function. In animal models, nucleotides have been shown to increase mortality because of graft-versus-host disease;22 increase rejection of allogenic grafts, and improve delayed cutaneous hypersensitivity and alloantigen-induced lymphoproliferation;23 reverse malnutrition and starvation-induced immunosuppression;24,25 aid resistance to challenge with Staphylococcus aureus26 and Candida albicans27; and enhance T-cell maturation and function.28-32 Animal studies also have demonstrated that nucleotides have stimulatory effects on gastrointestinal tract growth and maturation,33,34 intestinal repair after diarrhea,35 hepatic growth,34 and recovery from hepatectomy.36 Beneficial effects of nucleotides on immune response have been demonstrated in clinical studies of infants, including increased natural killer (NK) activity18 and decreased incidence of diarrhea.37
The nucleotide content of human milk is higher and qualitatively different from that of bovine milk or cow milk protein-based infant formula.38,39 The presence of nucleotides in human milk and reports of nucleotide enhancement of immune function led to the present study to determine if infants fed human milk, or control formula fortified with nucleotides, showed evidence of enhanced response to vaccine antigens as a measure of immunity.40
Full page at Modulation of the Immune System by Human Milk and Infant Formula Containing Nucleotides