Insurance is the opposite of a lottery. If you think buying lottery tickets are a waste of money because you lose out in the long run, the same argument should lead you to think having insurance is a good thing.
If insurance was cost effective in the long run, insurance companies wouldn't be profitable
It is akin to loans essentially - the one taking them may be giving profits to others but that doesn't mean it isn't cost effective.