What you've described is the case for all insurance. If the expected value of the insurance policy for the average buyer costs more than the premium, the insurance company will eventualy go out of business because they're paying out more in claims than they collect. All insurance, on average (as phoog notes, if you know your own risk is higher than average in a way the insurance company doesn't factor into their pricing, it might personally have positive value for you), is statistically a bad bet in the way you describe.

But that doesn't make insurance useless. You don't buy car insurance to pay for a $200 window replacement; you buy car insurance because you could be responsible for a ruinous sum of money if you're liable for someone's serious injuries or death. You don't buy homeowners insurance because your mailbox could get knocked over; you buy homeowners insurance because your house could burn down and building a new house is really expensive (and a mortgage lender will make you have insurance anyway). Similarly, travel insurance can cover expenditures that are rare but extremely costly. A helicopter rescue, emergency treatment, and air ambulance repatriation can easily cost in the tens or even hundreds of thousands of dollars. Such services may not be available at all unless you pay up front or an insurance company guarantees payment; even if you have substantial savings, trying to coordinate payment while you're seriously ill could be difficult. 

So you're right that many of the risks of travel are things you can self-insure out of your savings. If my flight is delayed due to weather and I need a last-minute hotel room, or my baggage is delayed and I need to purchase some clothes, I don't personally need an insurance policy for that. If my passport was stolen and I had to change my flights, ruin my plans, and travel to another city for a replacement, that would be phenomenally inconvenient, but fortunately wouldn't leave me destitute, so I wouldn't need insurance for that. But if I fell down a mountain and broke my legs in the Himalayas, that's more of a risk than I can personally afford to bear, so I'd want insurance.

Everyone has different risk tolerance, so it's important to look at both your financial situation, the risks involved in your trip, and the specific details of what a travel insurance policy covers. Even if insurance is financially a bad bet, it's valid to pay for peace of mind if it makes you feel better. There are other reasons why travel insurance can make sense for some people for some trips:

 - **Visa/entry requirements** A key reason to buy travel insurance is that it may be required. Applicants for Schengen visas [are required to have medical insurance coverage][1] (see Article 15). The medical insurance or government-run health system in many countries doesn't provide coverage, or provides only limited coverage, when you're traveling. To address this, you can buy travel insurance, either a basic policy that just fulfills the minimum requirement for medical coverage, an annual policy for those who travel regularly, or a fancier one that covers trip cancellation and other situations.

 - **Trip cancellation coverage** Travel can sometimes involve making costly non-refundable bookings for airfares, hotels, cruise ships, etc... Some people want to "protect their investment" with insurance that will cover these costs if something goes wrong, such as getting sick and being unable to travel, bad weather or a natural disaster, and other covered perils. For example, someone who has booked an expensive cruise may be worried about being out the cost of their cabin if their flight is cancelled and they miss the ship. Travel insurance policies can pay for these costs if a covered calamity occurs, giving you the funds to try your trip again another time. Travel insurance can also cover the costs relating to the bankruptcy of a travel provider.

 - **High medical costs** Some countries (the United States) have extremely high medical costs for those without insurance. Get appendicitis and need an emergency appendectomy? You will be getting a bill that's at least in the tens of thousands of dollars. Million dollar hospital bills can happen. While that may be negotiable to some extent, insurance makes a great deal of sense if your medical insurance at home won't cover this. Other countries and remote regions have very limited medical care, so any serious illness or injury requires evacuation to a major city or another country. This is also quite costly and something you will want insurance for.

 - **Specialized needs** Do you need a service that can coordinate a rescue and repatriation or get you a qualified doctor in a remote area? Are you sending employees to dangerous areas and need kidnap & ransom insurance, including crisis management for advise on dealing with such situations? These are particular reasons to get suitable insurance policies. 

So you're absolute right that it generally doesn't make sense to buy insurance for risks you can afford to assume yourself. But if the risk is too great for your personal risk tolerance, or insurance is required, it makes sense.

  [1]: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32009R0810&from=EN