I love the way people romanticise this hippie utopian idea of “The Internet” like it wasn’t originally built by, and for, the US Military
"For" the military is close enough, although "defense research" would probably be more accurate than "military" given that initial users were centered around large universities.
From the start the DoD had issues with the free and open culture from the userbase that skewed towards academic types, later splitting off into a restricted MILNET after a few years.