Its not necessary that someone gets diabetes just because he/she eats a lot of sugars or stuff containing sugar. There are other factors too that play a role as you have already mentioned. But controlling what you consume definitely goes a long way in preventing one from getting it.