Did all of the sport analysts I see broadcasting games on television major in communication and broadcasting or are they doing the job because they are formal athletes?
yes a lot of times the analysts or "color commentary" people have been athletes in their sport. Not a job requirement. Yes they are recruited for there star power and to give the network they're on legitimacy. However most the time their roles are usually limited. It's the guys in broadcasting with the gift of gab who do much the talking. So playing sports isn't a necessity, but doesn't hurt you at all in being able relate that knowledge to to people. Plus being on the inside you might have a better understanding on how these teams work. Which may give you an advantage in getting stories.
The play-by-play commentator more often than not wasn't a former college or pro athlete. But their partner, also known as the color commentator, normally has rich knowledge and experience with that particular sport, team or league. One tells the story of what's happening and the other comments on notable stats, plays, analysis throughout the course of the game to enhance the play-by-play commentator's storytelling.
You'll find a lot of sports analysts actually did not major in communications... they are doing broadcast work because they enjoyed the media while they were playing and it's a good way to stay connected to the game. Some might have broadcast as a background (Michael Robinson, NFL Network, for example, was a communications major at Penn State), but I think that's the exception rather than the rule.