Eating sugar is not a direct cause of diabetes; however, it can be detrimental for a diabetic patient or someone at risk of developing diabetes. Overeating added sugar is a risk factor for developing prediabetes, a precursor of type 2 diabetes. Rather than providing essential nutrients, added sugar produces excess calories, which leads to obesity in the long run. Overweight and obesity is a significant risk factor for type 2 diabetes. Furthermore, excess consumption of added sugar increases the risk of developing numerous diseases like heart disease, hypertension, respiratory problems, kidney diseases, non-alcoholic liver disease, tooth decay, and gout.
Reference:
Mayo Clinic: https://www.mayoclinic.org/diseases-conditions/prediabetes/symptoms-causes/syc-20355278
CDC: https://www.cdc.gov/nutrition/data-statistics/sugar-sweetened-beverages-intake.html
Heart: https://www.heart.org/en/healthy-living/healthy-eating/eat-smart/sugar/added-sugars