It is not always, and in fact there are common cases where it has significant positive expected outcomes.
Let's assume that you have sufficient wealth (say $40MM) that you can pay for a massive medical bill out of pocket. Let's furthermore say that you know, due to a hereditary illness in your family, that you have 90% chance you will be on the hook for a very large (say $1MM) bill when you're in the age range 20-30.
An american health insurance company legally cannot charge you more just because of preexisting conditions or family history, so health insurance will be a winning proposition for you.
Similarly, if you have information that the insurance company does not have, then you can "win" at other forms of insurance. If you have an ex-boyfriend who is prone to stealing bikes or setting homes on fire, then insurance covering those will have a higher expected value to you, and the insurance company is unlikely to account for that increased risk.
If you happen to know you're a bad driver, but have never been in an accident (only close calls), you might look normal on paper, and thus get a rate that has positive expected returns for you.
Said another way, insurance is not always a losing proposition. It can be a winning proposition if the insurance company doesn't understand the risks correctly or if laws prevent the company from accounting for certain risks.
[0] https://www.reuters.com/business/life-insurers-adapt-pandemi...