There are many reasons why I always liked basketball. One big reason is that it has a low barrier for getting involved: all you need is a ball and a hoop, plus you can play alone or with as many people as you want.
One less obvious, but I think more important, reason is because it cultivates individualism. Every player is empowered to change the course of a game. This power is not dictated by what position one plays. In football we clearly see that it is the quarterback who has the most power to affect the game. In this way, individual merit matters a lot less, because you can be the best kicker in the world and you will hardly get credit for a win compared to the quarterback.
Basketball also cultivates individualism because it's a lot easier to identify each player along with his emotions. As an audience member, this lets you further appreciate the player as a person rather than as a pawn in a game. This is very different from covering him with so much gear and putting him far in the middle of a gigantic stadium, where it's hard to distinguish him from others let alone see what he is feeling.
Also, I don't have the hard evidence to back it up right now, but it seems that the NFL is more strict with how the players can express themselves. How often do you see NFL players wearing ridiculous clothes compared to NBA players?
To put it simply, it seems to me that the NBA is marketed a lot better than the NFL. They know individualism is what sells.
So it will come to no surprise to me if there comes a day when the NBA surpasses the NFL as the most popular American sport.