The median American has $8,000 in their bank accounts. Most of the individual people buying insurance generally can't lose $N, because they have <$N - whatever amount the insurance claim is for is a number that they would never be able to pay, e.g. crashing your car into a semi-truck/lorry carrying a lot of expensive stuff or generating medical bills for people in other vehicles, or insurance for an ER visit that costs $800,000. Some individuals buy insurance for things they could pay, and just want to avoid the potential risk, but this is not the majority of people who buy insurance.
Both cases (lottery and insurance) are paying an affordable amount of money for a chance to avoid complete financial ruin.
I guess I'm just not seeing how it makes sense to describe missing out on an unexpected windfall as a failure to "avoid complete financial ruin".
Like, if I have $N of equity in my house and it burns down and it's not insured, then I've just lost $N regardless of what is or is not in my bank account. IMO there's really no comparison between that scenario and missing out on winning $N because I didn't buy a winning lottery ticket.
Both cases (lottery and insurance) are paying an affordable amount of money for a chance to avoid complete financial ruin.