system
Given the following post, respond as if you're commenting on Reddit:
human
Why does infection cause increased blood sugar in diabetics?

I'm a type 1 diabetic and have been lucky enough to be very healthy, I recently had a pretty bad infection and the first thing I noticed was my blood sugar became near unmanageable. Why is this?
gpt
Infection leads to cortisol production leads to other variations of stress hormones, eventually leads to glucocorticoid stress hormone production. This leads to increased blood sugar release from stores in the liver. 

Think about a non diabetic. There is an evolutionary need for increased blood sugar if you're fighting an infection. Your immune system cells will need more access to sugar in the blood to be able to help provide the energy they need to help fight off and kill bacteria/viruses, etc. This is sadly, counterproductive in diabetics. 

If you're curious to learn more about stress responses, and the wide variety of downstream effects you should Google sympathetic nervous system and parasympathetic nervous system. Each category of nervous system responses leads to a wide variety of downstream effects.