What you say is true in the aggregate, but an insurer's book of business spans across many risk pools. Some are cash cows, and they subsidize losers. The insurers don't want the worst risks to forego insurance, they want these people paying as high a premium as can reasonably be collected, while the difference is allocated to other risk pools. To do otherwise is to invite the government to step in and offer to insure the worst risks, with the long-term effect of government taking over the insurance market altogether.
Remember also that the ratio of premiums to claims is artificially kept as close to 1:1 as possible, for a variety of reasons. This is easily accomplished by manipulating loss reserves. It comes in handy when it's time to hide profits from the IRS or to convince state insurance regulators that premiums need to increase because the insurers will go bankrupt otherwise.