The problem with having a pet theory is that it predisposes you to narrow thinking.
These include environmental factors such as pollution, stress, disease, accidents, injury, infection and inflammation (e.g. Pancreatitis), cancer treatments, steroids, medications that increase or decrease insulin resistance, exposure to sunlight (vit D plays a large part in autoimmune issues) depression and anti depressants, sleep deprivation, career choices (activity levels getting to work, and while at work), hobbies, interests... Plus sport and exercise levels, of course.
You are also failing to take into account that there are more obese people without T2 than obese people with T2. There are also slim T2s. And T2s who have been fat, and got slim, and others who have been slim and got fat.
So even if bad diet is a causal factor (which it may be) there are clearly other variables in play.