You don't have to eat sweets to get diabetes. Diabetes is a breakdown in insulin production and glucose absorption. Type 1 diabetes - no insulin, type 2 - there is insulin, but the body does not respond to it. A healthy person can hardly limit sweets, does not greatly affect the onset of diabetes, but can worsen the already onset diabetes
You can only get type 2 diabetes. And for this, it is not necessary to eat exactly sweet, you just need to get very fat and it is better to grow old at the same time. Then your own insulin will not be enough to provide your entire body weight and diabetes will begin.
And type 1 diabetes is an autoimmune disease and it occurs for various complex reasons.