The government let what they had go because they wanted the tech from private companies that was better.
Not quite, the Hippies from the Free Speech Movement, namely Bill Joy, gave away to the public domaign BSD UNIX code for free and the government then used it!
During his seven years at Berkeley, Joy and a few other graduate students and staff researchers spearheaded an intensive software development effort that culminated, most famously, in a radically improved version of AT&T's Unix, known simply as Berkeley Unix or, more commonly, as BSD, for Berkeley Software Distribution.Talk about your killer apps! Berkeley Unix worked so well that DARPA chose it to be the preferred "universal computing environment" linking together Arpanet research nodes, thus setting in place an essential piece of infrastructure for the later growth of the Internet. An entire generation of computer scientists cut their teeth on Berkeley Unix.