The DoD, DoE and the Intelligence Agencies have dedicated R&D arms (DARPA, IARPA, ARPA-E, etc.) with long legacies of knowing how to to research and shepherd it into operational development states and/or commercialization. Even other parts of the civilian government has things like the NSF,
The closest the civilian world has for transportation is maybe NASA? But for self-driving cars, the DoT's R&D components are not well organized and seen very much as side-show "Administrations" and are generally new affairs. DOT's version of DARPA is called "RITA" and was formed only in 2005 by strapping together a handful of previous organizations inside of DoT and are focused mostly on, you guessed it, improving safety and studying statistics.
It's no wonder that most of the government research that's actually made progress in this area have all come from DARPA.