Starter frozen??….Like brrrr frozen

2016 Sportsman XP 1000
28 miles on machine

On my last day fishing Lake of the Woods I went to the trailer and tried to start the ATV( -20 that night) and only got a single loud clicking noise from the starter. Thought my battery was low or possibly frozen due to:
1. 20 below temps
2. Run a Hummingbird helix 7 for GPS
3. Aux LED lights
4. Hand & thumb warmers
5. Not able to plug into tender for 3 days

Got home last night and immediately plugged in my tender, only took a couple hours to go green but still just a single hard click. Left it on the tender overnight and this morning still the same thing. So I aimed a heat gun towards the starter for a few minutes and she fired right up!!
My question is why did this happen and what can I do to prevent it. I was in some pretty deep snow and brutal cold temps for several days!!
P.S. Fishing was good!!

Sent from my XT1585 using Tapatalk