Pre-WW2, many unions in the US had negotiated employer-paid health insurance as a (taxable) benefit. When the government capped wages as part of wartime price controls, these unions threatened to strike, which would have gutted industrial production. To avoid a strike, the government offered to temporarily make employer-provided health insurance a tax-free benefit.
Temporarily. And here we still are.