It has been possible to work out the basic mechanisms which lead to type 2 diabetes. Too much fat within liver and pancreas prevents normal insulin action and prevents normal insulin secretion. Both defects are reversible by substantial weight loss.
A crucial point is that individuals have different levels of tolerance of fat within liver and pancreas. Only when a person has more fat than they can cope with does type 2 diabetes develop. In other words, once a person crosses their personal fat threshold, type 2 diabetes develops. Once they successfully lose weight and go below their personal fat threshold, diabetes will disappear.
Some people can tolerate a BMI of 40 or more without getting diabetes. Others cannot tolerate a BMI of 22 without diabetes appearing, as their bodies are set to function normally at a BMI of, say 19. This is especially so in people of South Asian ethnicity.