Take the example of Firefly, amazing critical response, 9.2 imdb rating (#23 by user rating, #28 by number of votes, etc), an absolute fanatic fanbase that actually got the show to break Amazon's top 30 dvd sales list 196 weeks after release.
Average viewers? 4.7 million - 98th on the Nielsen list. Cancelled before the first season ended.
Meanwhile NCIS, one of the most predictable middle of the road bore fests gets 17 million average viewers 11 seasons, 2 spinoff series (5 seasons of NCIS:LA averaging 16.5 million viewers) all 3 are ongoing.
A bit apples and oranges, because Firefly was on Fox and NCIS on CBS. Firefly was forced on Fox (by Joss Whedon, who did Buffy) by tying the next season of Buffy with Firefly - if Fox wanted another season of ever-popular Buffy, they needed to take on Firefly.
It was doomed from the start - Fox execs basically did everything to kill it (the only obligation was to do barely enough to get Buffy).
NCIS, meanwhile, appeals to CBS viewers who skew old. Just because it gets 20+M viewers every week (30M combined) doesn't mean squat - the Neilson ratings on it aren't that high and other shows with smaller viewerships do often beat it. NCIS (and CBS in general, actually) tends to skew old, which means shows like NCIS don't actually get that high a rating (the ad price is midrange for a prime-time show), at least in the 18-49 market to which Neilson (and thus advertisers) care about. Ratings wise, it really means the "core audience" that they care about is about 1/3rd to 1/4th the number of viewers.
The Big Bang Theory is one of the highest rated shows on TV these days. And Firefly getting 4M viewers weekly would be considered quite good these days (well within the top rank, had Fox not decided to really just shit on the series as payback).
And the vast majority of people don't care about literature - they rather go for pulp fiction rather than say, Shakespeare or other literary figure. Because books, movies, TV shows, they can serve multiple roles. From enlightenment, contemplation, to just plain old entertainment and escapism.
So what if Transformers sells? (To be honest, the original TV series and movie weren't great to begin with - they were really half hour long ads and the movie was a way to force everyone to buy new toys). There's actually more depth in the remakes than the original.