Hockey is one of the most physically punishing, if not THE most punishing major sport in the world. The kinetic energy of even the smallest NHL players running one another into the relatively solid boards is immense. The kinetic energy of an open ice hit with big players makes the NFL look like a bunch of pussies.
With 10 players skating at speeds pushing 50kmh with sticks, there's no way that 3-4 officials can keep an eye on everything, and there's room for players to take 'liberties'. Fighting is, and always has been, a way for the players to self police. In the heat of the moment, a couple minutes in the box or perhaps a fine or minor suspension may not be much of a deterrent when you've got the other team's star player in your sites. Knowing that you're likely to get pounded by his teammate immediately after will cause you pause.
My Dad had a friend who played NHL hockey in the 80s and I remember one night at dinner he asked him why nobody ever took a run at Gretzky to 'send a message' when they were just getting embarrassed by the guy. His response was simply "27". Everyone knew that if anyone took liberties with 99 they had to answer to 27, and nobody wanted that.
Head hits have increased significantly once the instigator rule was put in. It got even worse with the revisions to the fighting major rules a few years back. You take out the accountability, you increase the liberties players take.
I'm not a proponent of staged fighting, or the lame auto-scrums that have plagued the modern game, but the core reasons for allowing fighting are strong and the game would be less entertaining to the fans and more dangerous to the players.