On a much more somber note, my sincerest condolences to the friends and family of the young man. This was indeed a tragedy.
It is true the Tar Heel nickname and the Ram mascot are not connected. For the origins of each, go here.
The "Tar Heel" nickname, for the State and for the University, preceded the Ram mascot. I would speculate that "Tar Heel" doesn't really lend itself to a mascot, so we settled on something else. In addition to the costumed Ram figure Jason Ray and many predecessors played, a real ram, his curly horns painted Carolina Blue, is a fixture at football games. Not so satisfactory for indoor events.
Nickname/mascot divergence is not unique to UNC. The Alabama Crimson Tide has an elephant as a mascot, for example.