It's not quite so simple. There isn't anything that outright "causes" diabetes. It's not a simple cause-and-effect where "If ABC is present, the hamster will definitely get diabetes. If ABC is not present, the hamster will definitely not get diabetes."
A very, very big part of diabetes is genetic. It sometimes it's just having the right (or wrong) combination of genes. So a hamster could be in great physical shape, have a great diet...and still get diabetes. Conversely, an obese hamster on a junk food diet might not get diabetes.
Now, there are what we call "risk factors." That is, things that increase the risk of developing diabetes. Obesity is a big one, as mentioned in the original post. However, we have to be careful not to mistake "risk factor" with "cause." It is not guaranteed that an obese hamster will automatically get diabetes. All it means is that having extra weight might make it more likely that the hamster will develop diabetes than if it were a healthy weight.
Wow, interesting! Always thought that any kind of sugars, no matter natural or processed, would cause diabetes in hamsters. Now that I think about it, that's pretty stupid .
Thank you Tax, and everyone else who helped with this!