The military is a great source of funding, it is pretty much that straight forward. I knew a number of students that did work for the military because they would pay scholarships. If someone thinks this is a bad relationship, then move that funding to the NSF or NASA or NOAA instead and authorize them to fund out-there ambitious projects just like DARPA and the military.