 Bob Newhart (qv) said in an interview that the filmmakers ran out  of money before filming the real ending for the film, so they  settled with the current one which turned out to be one of the best  endings ever for a war film.