I am no doctor but guess eating sugar has nothing to do with diabetes.

A person with diabetes type 1 developed the disease because their immune system destroyed the insulin-producing beta cells.

A diet high in calories, which can make people overweight/obese, raises the risk of developing type 2 diabetes, especially if there is a history of this disease in the family.