Such laws are required to ensure national security specially during times of war.
Explanation:
The Schnek case in 1919 helped define limits ot freedom of speech explaining when is the government allowed to limit freedom of speech. The government may limit freedom of speech when it sees the resistance as threat to national security.