My guess is if your numbers are good fasting but you have a high A1c then the most likely scenario is that your glucose is high throughout the day. It' s not quite clear if you mean immunity (like from viruses) or if you mean something else. I can't speak to immunity but I know that high glucose causes damage to your body, eyes, kidneys, nerves, etc. Even if you fasting glucose is good having high glucose the rest of the time is still doing damage. The A1c is a measurement of how much glucose is stuck your hemoglobin. Once glucose is stuck to the hemoglobin, it is there for the life of the red blood cell (typically 2-3 months). If you have a high A1c then that means that you have a lot of glucose in the blood (at some point) available to stick to the hemoglobin.
(Disclaimer: There are circumstances where the A1c reading is inaccurate such as anything that could impact the life of the red blood cells, among other situations but, the majority of the time it is as I said above).