There are varying degrees of hazing, though. And many of them do an excellent job of building esprit de corps amongst groups of (mostly) young men. In the Navy, we had several "hazing" rituals. One was the "tacking on" of crows. When you made Petty Officer Third Class (a rank, and roughly equivalent to a Corporal in the Army), you were considered an NCO (Non-Commissioned Officer), and it traditionally is kind of a big deal. When you put the rank on, and you start wearing the "crow" insignia on your sleeve, everyone who is of equal or higher rank is generally permitted to "tack it on", to keep the crow from flying away. This is no more than everyone getting to take a free shot at punching you in the upper arm. It is not unheard of to take 200 or more punches, on the day that you get promoted. There is also the Shellback initiation, on board of Navy ships. When a sailor crosses the equator for the first time, he participates in a day of hazing as an "offering" to the god of the sea: Neptune. There are all kinds of debasing and humiliating tasks he must perform, in order to receive his shellback card. Both of these rituals can be an important part in a young sailor's development as a professional warrior. And it shows his shipmates that he doesn't put himself above the team.
So not all hazing is negative. It is when zealots, sadists, and just plain assholes get carried away that it crosses the line.