They fought and died for that freedom of speech. I've spoken with many veterans who share this view. They fought against the very fascism that would imprison people who do such acts. They also recognize that those who burn the flag are not thumbing their nose at the service members, they're doing it at the government.
The flag is just a piece of colored cloth. Books are an entirely different matter.