Thackeray is working in a long, long tradition of satire as beat-down. What an author is supposed to do is hold up to readers examples of their terrible, ludicrous, immoral, and otherwise bad behavior, then either mock them or lecture them until they cut it out. The ancient poet Juvenal started things off with his bitter rants attacking everything about the decadent, crumbling Roman Empire. Gradually the mood of satire shifted to include humor instead of just anger – the Middle Ages gave us Chaucer and Rabelais with their bathroom humor and sexual puns. The satire genre reached its highest peaks in the 18th century, with Voltaire, Fielding, Swift, Pope, and a bunch of other really funny, really cynical, sort of depressing authors, who wrote work after work after work pointing their fingers at all the different flaws in the human character. Greed, hypocrisy, ignorance, self-importance, promiscuity, and, of course, vanity each came in for their share of ridicule and scorn. Thackeray was heavily influenced by Fielding, and Vanity Fair is an updated version of satire, a withering look at the ways in which snobbery, rampant sexual and worldly appetites, and a total lack of care about other people permeate society.
This is a "canonical text," meaning that it's one of a group of novels, poems, and plays that are almost universally acknowledged as important pieces of literary art and fundamental to the development of Western civilization. What's interesting, though, is that at the time it was published, this novel could have been considered "popular fiction" as well. It was certainly what we would now call a bestseller, and because it was published serially (check out the "In a Nutshell" section), Thackeray needed to emphasize the thrills and chills of its plot to get readers coming back for more.