They compete with other insurance companies for customers. And the way to do that is to minimize the cost of insurance for a given payout. Which can push the expected value to go positive.
If a bank can pay you positive value (in the form of interest), an insurance company can as well.
If a bank can pay you positive value (in the form of interest), an insurance company can as well.