The short answer is I don't know for sure, but in most to least likely I'd say in my case:-
1. leaky gut (probably caused by a combination of gluten and emulsifiers in processed foods) and immune response to part digested foods that got into the bloodstream as a result leading to food associated autoimmunity.
2. high stress/shock event (being knocked off my bicycle with an associated ambulance trip to hospital) and it was my own fault

3. infection either viral or dental infections.
Of the three the leaky gut is one I can do something about in terms of trying to at least slow progression - the others I can't even hope to fix without a time machine
For me the huge increase in type 1 has to be related to food/environment factors ... genetics might make people more susceptible but does not explain the recent increase.