I’m not a lawyer, so I can’t give you an authoritative explanation of the difference between insurance and gambling. But I would guess one factor is that the insurance payout is somehow tied to the actual loss.
Kalshi is clearly not an insurer. But the commercial role they filled in this very specific situation is the same as a prize indemnity policy.