I don't know the medical reasons, but as I understand it the thyroid gland affects virtually all the body's functions. I have hypothyroidism and it is probably one factor among many others why I became T2 diabetic.
Thyroid problems seem to be a fairly common condition with people who have diabetes.