The conventional explanation blames WW2 wage controls for creating the benefit as a differentiator.
The more cynical among us suffer it as cost of satisfying capital by way of employee job lock, particularly when coupled with the soon-to-return preexisting condition exclusions, and even though the locks disincentivize entrepreneurship and other sorts of beneficial risk tasking.
See the history of the Stabilization Act of 1942 [1] and Executive Order 9250. Wages were frozen by law, but not benefits, so companies began offering benefits, including health insurance [2] The next year the IRS decided these were nontaxable, until it changed its mind in 1953, only to be overruled by Congress in 1954 [3].
[1] https://en.wikipedia.org/wiki/Stabilization_Act_of_1942 [2] https://www.nytimes.com/2017/09/05/upshot/the-real-reason-th... [3] https://economix.blogs.nytimes.com/2013/07/30/the-question-o...