I am a huge hockey fan. Let's go, Predators!
Yes, the fights are fun for fans, but they happen for a reason. Hockey is fast-paced and dangerous. Highly skilled players are targeted, and it's not difficult to cheap shot a hit and put a valuable player on the injured reserve list. Enforcers are players whose main job is to bring a physical presence and protect their teammates. Fights most often happen as a response to a questionable hit. If you are the type of person who wants to rough up another player, you may think twice about it if that team has a big dude who will punch your face in for being dirty.
It's also a morale thing. Sometimes when a team is getting pounded and underperforming, a fight will ignite and inspire the rest of the team to continue that energy. Sometimes teams simply hate each other due to rivalry or history, and their players are more likely to take offense to something.
Love it or hate it, it is a cultural norm in the game. The NHL made moves years ago to try to phase it out, but it seems lately to have come back with a vengeance. I'd personally rather see fighting than cheap-shotting, as injuries very rarely result from a fight.
Plus, if you really hate a player, it's so satisfying seeing them get punched in the face.
O