Here's why:
* As an adjective: When used as a general adjective describing something belonging to or relating to a nation, "national" is not capitalized. For example: "The national anthem," "national parks," "national security."
* As part of a proper noun: When "national" is part of a specific name or title, it is capitalized. For example: "National Geographic," "National League," "National Guard."
In short, capitalization of "national" depends on its function in a sentence.