Historically health insurance developed around the turn of the century along-side things like fire insurance. This sort of made sense at the time, when our understanding of health and our ability to treat disease was extremely primitive.
Eventually science progressed to the point that medical care was an inevitability in people's lives; which is a surprisingly recent development due to modern medications, lab tests, improved treatments and surgeries, increasing preventive care, etc. Faced with this sea change, developed nations around the world transitioned to some form of universal health coverage.
Only the United States persists in the delusion that an insurance-based system is an efficient way to provide healthcare.