Auto insurance is a good example but not for the reason that you cite. To drive, all states require the driver to carry at least liability insurance. Most states require auto insurers to insure a certain amount of high-risk drivers in order to sell insurance in the state. There is a limit to how much they can cherry-pick the best customers. Why? It was decided that for society as a whole, it is better for everyone to have to pay a little bit more for auto insurance than to have someone suffer a catastrophic loss due to an uninsured driver.
The point being that in either case - health or auto - the insurance model breaks down if people are allowed to game the system and wait until they have a catastrophe and then sign up for insurance and expect the insurance companies to pay for it. This makes everyone’s rate goes up in order to subsidize someone who refused to buy insurance.
Why? It was decided that for society as a whole, it is better for everyone to have to pay a little bit more for auto insurance than to have someone suffer a catastrophic loss due to an uninsured driver.