What makes something an object of fandom? There are some works that attract obsessive fannish behaviour and some that don't -- and this seems to be independent of popularity. To take an example from LucasProduct, both Raiders of the Lost Ark and Star Wars are hugely popular movies, but only the latter has developed a significant fan base. Why? My theory is that for something to attract fans, it must have an aspect of truly monumental badness about it.
Raiders of the Lost Ark is a robust potboiler, tongue-in-cheek, very competently done. I think it's enjoyable, but even among those who don't, it's hard to see the film attracting actual derision. Boredom or irritation, probably, but nothing more. Star Wars, on the other hand.... From one perspective, it's an entertaining space opera, but from a slightly different perspective, an imperceptible twist of the glass, it's laughably awful. Utterly ridiculously bad. And it's this very badness that makes so many people take up arms in its defence.
Once a work passes a certain basic all-round level of competence, it doesn't need the defence of fandom. It's impossible to imagine a fan of Animal Farm, the Well-Tempered Clavier, or the theory of gravity. Such works can defend themselves. But badness, especially badness of an obvious, monumental variety, inspires devotion. The quality of the work, in the face of such glaring shortcomings, becomes a matter of faith -- and faith is a much stronger bond than mere appreciation. It drives fans together, gives them strength against those who sneer. The sneers make their faith even stronger; the awfulness of the work reassures them of their belief. And so the fan groups of Tolkien, Star Trek, Spider-man, Japanese kiddie-cartoons etc. develop an almost cult-like character.