Gambling is played through "games of chance." Which is all you're betting against.
Insurance is priced through "underwriting." Which measures the value of the underlying economic activity or instrument within the fair market and puts a contract price on it's guarantee for a limited period of time and specific purpose.
There's also broader forms of historical "insurance" such as the maritime law of "General Average." Which further highlights the differences between the nature of insurance versus the nature of gambling.
Insurance is priced through "underwriting." Which measures the value of the underlying economic activity or instrument within the fair market and puts a contract price on it's guarantee for a limited period of time and specific purpose.
There's also broader forms of historical "insurance" such as the maritime law of "General Average." Which further highlights the differences between the nature of insurance versus the nature of gambling.