1) The majority of the DoD struggles to get permission to use open source software. There are plenty of developers, DBAs, and IT technicians who would love to use some piece of software that they are not allowed to use specifically because it is open source. I once spent 11 months trying to get approval to use a single Google-produced library. I was unsuccessful.
2) Related to the above, agencies responsible for approving software for use are very concerned with licensing issues. After all, they are used to negotiating licensing terms for multi-million dollar contracts. The fact that OSS essentially guarantees that you have no one to call [2] when you have an issue (for the entire lifespan of the project) is a large part of why they will not approve OSS. Beyond that, compliance is a real concern. Popular opinion may be of heartless assholes, but these are real people working jobs. I would not be so cavalier in saying "they'll just use it anyway".
3) I am always disappointed, though never surprised, when people assume that the military works solely to execute war. I was specifically contracted to a (large) part of the military that works on exactly the kind of thing that prevents and reduces violence (sorry to be vague). The kind of domain that would probably translate improved computer vision into saving lives (domestic, foreign, combatant, and civilian). That is, if they could get approval.
[1] I have no idea how other countries' militaries operate.
[2] Literally call. On a phone.