Mr. lybrate-user, Thanks for the query.
The main cause for diabetes
is lack of insulin, that is the beta cells in pancreas get affected and produce less insulin. Due to uncontrolled glucose and increased fat in the body, these cells get further affected so progressively there is less secretion of Insulin. So when a person has diabetes over many years like 20 to 25 years or longer, slowly beta cell function goes down and a time comes when there is a need for external Insulin to maintain expected glucose levels. This happens particularly if blood glucose is not well controlled. Thanks.