The league could eliminate all these cheap things, retaliation stuff, fights, all of it, if it wanted to, and turn it into, I dunno, volleyball or something. But the league likes its edgy thing it has had going for a hundred years or so. The league honestly doesn't even care one bit about players brains, but they do care about losing multi billion dollar lawsuits so they try halfheartedly to protect players heads.
The fact that a fight gets you 5 out of 60 minutes in the box shows just how little the NHL wants to remove fighting, and so the "code" lives on.