Tolerance is one of the coolest things in immunology.
This Nobel is about peripheral tolerance, but you should first appreciate central tolerance to understand why it matters.
After the stem cell phase, just about every cell in your body gradually becomes locked in a specific program (differentiated/specialized) so that your heart cells lose the ability to express say lung proteins, and vice versa.
But in order to train your immune cells not to react to self, during development some cells in the thymus are allowed to express self proteins from every type of tissue, so your thymus expresses neural, heart, lung, etc.. proteins. Any T-cells that react with this self proteins are deleted.
https://en.wikipedia.org/wiki/Autoimmune_regulator
However, central tolerance is not that efficient, so peripheral tolerance takes care of the T-cells which escaped central tolerance. A major way that this is accomplished is by counterintuitively maintaining a population of self-specific T-cells called regulatory T-cells which put the breaks on immune reactions in the presence of self antigen (antigen = 3D shape of protein or sugar).
In many ways tolerance is actually the default reaction of the immune system - you encounter too many foreign objects (in food, air, etc) to react to everything. That's why vaccines have an "adjuvant" compound which tells your immune system to react.
This is fascinating.
If one had an infected thymus, does this mean that immune cells would be eliminated for attacking the infection, and thus the immune system be tuned to ignore the present infection?
I've never thought or heard of that, but theoretically yes?
However most of this happens before birth, and thymus infection is pretty unlikely at that point - the baby is protected by the mom's antibodies and is also physically sequestered. If the unborn baby has a thymus infection I would be more worried about what the mother has.