Defense was certainly a consideration, but not the primary consideration. Militaries can move just fine on rail, and largely did and often do. The US military strength has always been premised on a strong economy, which happens to be where the interstate really shines. But the military first myth is common enough that the DOT specifically addresses it on its myths page.
"The primary justifications for the Interstate System were civilian in nature. In the midst of the Cold War, the Department of Defense supported the Interstate System and Congress added the words “and Defense” to its official name in 1956 (“National System of Interstate and Defense Highways”). However, the program was so popular for its civilian benefits that the legislation would have passed even if defense had not been a factor. "
and
"President Eisenhower’s support was based largely on civilian needs—support for economic development, improved highway safety, and congestion relief, as well as reduction of motor vehicle-related lawsuits."
and in case anyone was wondering, the interstate-runway requirement is also a myth:
"This myth is widespread on the Internet and in reference sources, but has no basis in law, regulation, design manual—or fact. Airplanes occasionally land on Interstates when no alternative is available in an emergency, not because the Interstates are designed for that purpose."
www.fhwa.dot.gov