Adverse selection is the big reason. An individual signing up for insurance can be used as a signal that means "individual is sick" or "individual is likely to need insurance soon". If a company policy covers all employees (or all employees above a certain level), the signal is "person works" which is orthogonal to "person will need insurance" (in fact, it's probably slightly anti-correlated, a.k.a. "person is fit enough to work").
"Small-group" coverage is generally 50 or fewer (in some states, 100) members:
https://www.healthinsurance.org/glossary/small-group-health-...
Otherwise, the socialised version already exists, in most industrialised countries, in some form or another. Within the US, Medicare for the elderly, Medicaid for the poor and children, and in many states, "high risk pools" which are state managed.
More generally, a problem is that the bulk of health benefits do _not_ accrue from direct or acute medical treatment, but from public health and preventive measures, _especially_ well-mother, well-baby, early childhood, municipal sanitation and environmental measures, and general (workplace and elsewhere) safety provisions. Insurance companies of and by themselves don't address much of this.
The history: wage-price controls implemented during WWII as labour was taken up by the military and companies had to find some basis other than pay on which to differentiate. Benefits, including health care, were excluded from wage consideration.
Insurance itself is the business of assessing, managing, and sharing (or "pooling") risk. In the case of health care, the typical costs that a given population will face are predictable based on age, gender, and various exposures. Given a sufficiently large number of people, a group or policy cost can be assessed. Along with other groups, this results in pooled risk.
I'm not an actuary, but "large pool" risk is fairly low, I suspect it's on the order of 30 or so people. Smaller pools can be formed (or more likely: aggregated to form larger ones), down to a small number of members, as few as a handful or so.
The idea being that in any given pool, what's called "adverse selection" (people specifically looking for insurance due to high risks) are less likely -- you're dealing with the average population.
In individual markets, all of this becomes much less predictable, and/or the transaction and administrative costs of individual insurance simply add up.
Since a large share of the population works, or lives in a household with someone who does, allocating healthcare group insurance through employment has more-or-less stuck in the US.
The fact that it provides yet more leverage and control by employers over employees is another factor, of course.
Source: A long time ago in a galaxy far, far away, I studied this at uni. Plus more recent experiences / exploration.