McNamara cut his teeth on real world problems in the AAF's Office of Statistics and worked with General Curtis LaMay to plan how best to use the B29 bombers. He became an expert with statistics and other math tools and thought they could be widely applied to business and, of course, war. Once he had these marvelous tools he found nails everywhere.
For instance the rate of German tank production was accurately estimated by collecting the serial numbers of all the tanks (and some tank components) that were knocked out. Best methods of attacking submarines was worked out this way as well as well as where to place armor in bombers, etc.