Please don't propagate that our immune system is a muscle we need to train (in that simplified way).
Your immune system actually never takes a break: it's continually working intensely, that's why/when you're not ill most of the time.
Case in point: your body _constantly_ gets "agressions" from bacterias, viruses, germs from the air your breathe, the things/people you touch, the scratches you make, what you eat.
When you get symptoms (a flu, a cold, whatever disease), it's because your immune system gets overwhelmed, is working even harder, has a hard time to keep up.
When you get exhausted for other reasons (not enough sleep, too much exercise, stress, etc.) your body has less energy for your immune system to work properly. This explains why you easily catch an infection you wouldn't when you're not exhausted.
It's a matter of preventing it (washing hands often, masking in crowded areas, ventilating rooms properly) and helping our body system to be rested/strong (getting enough sleep/rest, dressing warm, drinking enough). And of our own conditions. And luck.
Yes, immune system memory is at play, but even with the exact same virus, getting the flux in year 1 doesn't mean you'll not get it in year 2 if your body is unwell already.
Moreover, getting the flu (or any infection really) is not a small thing: it can break you down for days, weeks, months and even kill you. Best to avoid it when you can, and be happy when you avoided it.
The pseudo darwinist thing of "getting infected trains your immune system / makes you stronger" or "what doesn't kill you makes you stronger" is bs on the other hand.
I guess making up analogies doesn't work....
Polio disproves that conclusively.
Your explanation agrees with me here; describing it as a problem with the immune system is inaccurate. Relatively rapid immune escape is a feature of certain viruses.