If military movies were automatically successful we'd make nothing but military movies. But seriously, patriotism is one thing that all Americans have in common.
Basically you come up with the fictional idea and you start writing that story, but then in order to write it and to make it seem real, you sometimes put your own memories in. Even if it's a character that's very different from you.