Alpers writes that the U.S. government "saw knowledge of the facts as essential to the morale of U.S. troops in a war against fanatical belief systems" (p.175), and the Why We Fight series was thus "built around the notion that factual knowledge about the war was the best basis for troop morale" (p.178). However, the films were "ultimately more factitious than factual" (p.179).
Much of the footage was...not what it claimed to be. Following a cinematic tradition established long before by newsreels, the Why We Fight series included footage from Hollywood features passed off as actual battle footage, staged scenes of life in the Axis countries, and captured footage taken entirely out of context.... Capra defended [this], maintaining that it was simply the most effective way to package fact. (p.179)
However, subsequent research on the films' impact on soldiers showed that "although the films did impart greater factual information about the war, this information had...no effect whatsoever on morale or combat motivation." (p.180)
As Alpers's discussion in the same chapter (called "This is the Army") suggests, the impact of Hollywood during WW2 was probably greater on civilians, as movies deployed the convention of the multi-ethnic combat unit as a symbol of American democracy and pluralism. Of course, this ran up against the awkward fact of racial segregation, both in the army and at home. Hollywood, not surprisingly, found it difficult to square this circle (see p. 170).
My own impressionistic sense -- not having researched this -- is that the relationship between Hollywood and the military began to turn a bit more adversarial during the first decades of the Cold War, with movies like Dr. Strangelove. By the Vietnam era, the splits in U.S. society were reflected in the movies, with John Wayne for instance continuing to make pro-war films while others made anti-war ones. (I think Apocalypse Now will probably be the most-viewed of these years from now, although there were a raft of them, including Platoon, The Deer Hunter, Born on the Fourth of July, and so on.)
As the Sirota piece linked in a previous post indicates, Top Gun represents a swing of the pendulum back toward celebration of militarism (not quite the right word, perhaps, but it will do). A trickle of dissent begins to return with the movies made after the first Gulf War (not that I saw any of them, I don't think), and this trickle becomes more of a stream with the movies of the current period that deal with the post-9/11 conflicts. Many of these (e.g., The Hurt Locker, In the Valley of Elah) I have not seen, but I did see Stop-Loss (2008) and Brothers (2009). I had to look up the titles of both of these on IMDB just now -- I remembered the actors but not the titles. (One of the joys of being middle-aged.) Stop-Loss was better than Brothers, as I recall, although the latter had its moments. I also saw (but on DVD not in a theater) a movie about Iraq with Matt Damon in it. Again, I don't remember the title and this time I'm not going to bother looking it up. Matt Damon fans will probably know the movie I'm talking about it and everyone else will probably not care too much. It was not great, but in terms of its politics definitely quite critical of the U.S. role, or at least of the military/occupation hierarchy.
P.s. There have also been, of course, documentaries on recent conflicts. E.g., on Afghanistan, 'Restrepo,' which I've mentioned before, and 'Armadillo,' which I haven't seen but which V. Yadav writes about here.
P.p.s. I've now seen The Hurt Locker. Worth watching.