My impression is that they can get away with requiring permits for demonstrations because there are physical space considerations, public safety, etc. Imagine if a state decided you needed a permit to write for a political blog. Same content as a protest may have, but without the meatspace messiness.
Of course, I did not mean to imply equivalence. I am only pointing out that restrictions to freedom of speech being acceptable for physical protests does not necessarily imply anything about what may be acceptable limitations in other scenarios.