As long as there have been sports, colors and symbols have been used to create social bonds between teammates and fans. Even ancient Roman chariot racing had four major groups consisting of the Reds, Blues, Greens, and Whites (they also had some serious sports-related riots).
Sports team names don’t always seem to make much sense at first glance, but things start to get much more clear once you know some of the history behind the nicknames. When baseball clubs started forming in the United States in the late 19th century, they used fairly generic names followed by B.B.C (“Base Ball Club”). Soon after, preferences shifted towards using stocking colors as team names. As the popularity of baseball picked up, newspapers started covering games and they often created nicknames for teams based on a defining characteristic of the team’s city or area. In cities with more than one team, nicknames were especially likely to be invented in order to differentiate teams more easily, and the formula of “City + Nickname” was born. These days, team names might be carefully chosen by a marketing team, but they are still modeled after the newspaper-created names, and they serve the exact same purpose as they did over 100 years ago: to establish team identity and make teammates and fans feel as if they belong to a group.