It is indeed difficult to talk about functionality of war within capitalism when the phenomenon of war is so much older. Empirically speaking, capitalism(s) do not know all own working options well as yet. The modern war does seem to function for certain industrial-political elites in the US in somewhat familiar ways - but that does not necessarily mean that war is playing a role for the capitalism. Rather contrarily, the system that Republican elites is striving for looks more like unbounded feudalism (for the few able reap everythig around). Their basic instinct is preservation of their wealth and status through generations, and they do it in the most straightforward "tried" way - by limiting de facto possibilities for those still behind, and allowing themselves absolute "freedom". Here warfare indeed works in familiar ways for them. (In fact, freedom of warfare might be considered as one of their traditional freedoms, ha ha.) Somehow they (almost) manage to achieve feudal standings within the modern frames of democracy and even (yes!) capitalism.