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...