"Any man will go considerably out of his way to pick up a silver dollar; but here are golden words, which the wisest men of antiquity have uttered, and whose worth the wise of every succeeding age have assured us of."
-Henry David Thoreau, Walden
One of my favorite quotes when it comes to the importance of literature and the written word. Books are something that gives us a window into places we would never be able to reach in our life. We can see moments of history through the writers of that time, live other lives and adventures if only for a short time, and look at something through another person's perspective.
Since you said "The Flag" I will assume you mean the American flag, our flag. A flag that is nothing more than a piece of cloth with colors and designs. Unless! it is tied to a set of ideals, a system, or a common belief. These things have the power to judge, condemn, oppress and misrepresent those not gathered under it and even those who are.It is a symbol and if it's burned, we do not lose anything if those ideals right or wrong still stand.
I book comes from someones mind, their perspective, their time period or whatever else could influence a writer. Yes these writers may be judgmental, quick to condemn or seek to oppress people through their words. But the words themselves are inert, and open to interpretation through the reader who is free to use them however they see fit. Be it to further understanding, find perspective, or rationalize beliefs or however else they may choose to use them. Everything that is important about a book is contained in its pages and ink, and in burning a book you destroy more than a symbol that only holds the meaning people give to it. You destroy an actual physical collection of thoughts, knowledge and understanding.
I would much rather light fire to every american flag I come across, than to burn even the most vile, judgmental, or just plain badly written books. I don't care if it's mein kampf, the bible, or twilight it will always have something to offer to someone. When it's gone though there is a chance of never getting that unique set of words back no matter how much we want it. A flag can always be recreated, or replaced with something new as long as its bearers are still gathering under it.