That's one way, certainly. You could say it's the root of all (and reason we have) genres. You write what the audience wants, and "quality" is judged on ticked boxes, meeting expectations.
You could then say that "literature", being so often the antithesis of "genre", is where an author writes what they want, rather than what the audience wants. An obvious example would be 1984, which, though obviously science fiction, is almost always considered otherwise. It doesn't conform to the genre expectations (certainly of its time, anyway).
Obviously, it's not that simple (or else people wouldn't still be arguing about the terms), but it's one way to look at it, and can help you define/market your work.
Saying that, writing for a mass market doesn't mean it has to be shite (just that it's easier to get away with it), and there's plenty of "literature" out there that's Twilight levels of awful...