Why does immunity to pathogens that our parents are already immune to have to still be aquired later on in life through infections and shots and not just be inherited through genetics?
Acquired immunity (via shots/infection) is not genetic in nature. It’s training your immune system like your brain learns to read or walk.
Immunity can be conveyed via genetics if there’s a mutation that happens to make you immune to a disease. We’re exploring using gene therapy to make people immune to certain diseases.
Another thing is that your genome isn’t a fixed/universal thing. Every cell in your body has a copy of your genome and each of them can mutate independently over the course of your life due to things like radiation or viruses. Egg/sperm cells are in an even more special situation because they come from cells that are normally even more isolated from the rest of your body and don’t divide the same way. There’s an ongoing debate around the morality of using gene therapy when it comes to egg/sperm cells because there can be unintended consequences from introducing genetic engineering into the wider human gene pool.
Should also be noted that there are other ways you can gain immunity from your parents. Recent studies have indicated that you gain a lot of immunity from your mother from a combination of birth (messy, lots of blood around) and breast milk (some antibodies seem to be transferred this way).
Immunity isn’t exactly based on genetics (actually it is, but we’ll get back to that). What I mean is, there isn’t a gene that make you immune to a disease and lacking that gene would make you susceptible to that disease. Instead, immunity is based off of your immune cells and their ability to recognize certain molecular patterns. You’re probably thinking “Why wouldn’t this be a gene that can be inherited” and that’s a good thought. Think of it this way, if immunity was based solely on inheriting certain genes, how would you ever develop an immune response to a brand new pathogen, like the one the world discovered in 2019. Your immune system needs to be able to identify never before seen molecular patterns as well as familiar molecular patterns.
The way this is accomplished is by giving some of your immune cells “permission” to mix up specific parts of their DNA associated with their recognition sequences. These randomized cells are then screened against all of the signatures that you make naturally to prevent your immune cells from attacking yourself ( an autoimmune disorder is when this screening process is broken). The randomized immune cells are then pumped into your system, where they may or may not encounter a foreign pattern that they recognize. If they do encounter such a pattern, this triggers a replication process resulting in more of the immune weapons needed to fight the encountered pathogen.
So, in short, it is exactly the reason why you cannot inherit immunity from your parents that makes your immune system so powerful
Because (acquired) immunity isn’t carried by a gene. It’s carried by a bunch of white blood cells that and antibodies that “match” a specific protein in such a way that they can bind to it. They can stick around in your body after an infection, but they aren’t written into your genetic code. (You do, however, get some of them via breastmilk from your mother if you’re breastfed as an infant, though those usually do not stick around for very long.)