NBA extends television deals with ESPN, TNT
I don't know what it comes out to per game, but part of the contract was a general agreement that ESPN would significantly up their NBA programming outside of just airing the games. That works out well for both sides; NBA gets more exposure, and ESPN gets to defend their massive investment in the deal. Because of that particular contract the NBA has with ESPN and because the NBA is good at social media, I think there's a perception out there that the NBA is more popular than it actually is.
Back in the day, watching SportsCenter or ESPN generally was a great barometer of the relative popularity of all sports because SportsCenter was a one-stop-shop for sports coverage. In the 90s, for example, ESPN didn't air any NBA games at all, yet they still covered it, showed highlights, etc. because basketball fans, hockey fans, baseball fans, etc. all tuned into SportsCenter to see what happened in the sports they followed. They had a vested interest in proportionally covering a variety of sports, even if ESPN didn't air games from those sports themselves.
Because the media environment has changed, ESPN has much more of a vested interest than they used to in covering just the sports they have TV rights with, which can create kind of a false impression of the relative popularity of different sports. Take when the X Games are going on, for example.
If you watch ESPN while those are going on, you'd think the X Games was as popular as the NBA. If all you did was watch ESPN, you'd think the NHL had borderline-folded and had 6 teams left in it or something. They just have different incentives than they used to.