@Neuroborean I dont have time to explain everything in detail but this answers your two points that you put forward.
The original software, The Onion Router (TOR), was developed by US Naval Research Laboratory employees Paul Syverson, Michael Reed and David Goldschlag in the mid 1990s to protect the identity of US Navy intelligence agents.
As for why making it public heres your answer
If the "government" (or rather, the united states naval research lab) was the only one to use Tor, then obviously they wouldn't gain any anonymity. Someone who noticed traffic from a Tor exit node would immediately know that someone from that research lab was behind the requests.
So by making it public and encouraging a wide variety of people from all walks of life to set up exit nodes and use Tor as a client, it becomes possible to hide in the mass of people who use Tor. So if you use Tor, it might be because you want to buy illegal drugs, but it might also be because you're a whistleblower or a human rights activist, or simply worried about your privacy on the internet.
Since the US law enforcement, government and intelligence agencies and armed forces sometimes require anonymity for their communication, too (that's why Tor was birthed, after all), diversification of the Tor user base would be something they'd be interested in, and that can't be achieved by keeping Tor use limited to US government agencies.
The original software, The Onion Router (TOR), was developed by US Naval Research Laboratory employees Paul Syverson, Michael Reed and David Goldschlag in the mid 1990s to protect the identity of US Navy intelligence agents.
As for why making it public heres your answer

If the "government" (or rather, the united states naval research lab) was the only one to use Tor, then obviously they wouldn't gain any anonymity. Someone who noticed traffic from a Tor exit node would immediately know that someone from that research lab was behind the requests.
So by making it public and encouraging a wide variety of people from all walks of life to set up exit nodes and use Tor as a client, it becomes possible to hide in the mass of people who use Tor. So if you use Tor, it might be because you want to buy illegal drugs, but it might also be because you're a whistleblower or a human rights activist, or simply worried about your privacy on the internet.
Since the US law enforcement, government and intelligence agencies and armed forces sometimes require anonymity for their communication, too (that's why Tor was birthed, after all), diversification of the Tor user base would be something they'd be interested in, and that can't be achieved by keeping Tor use limited to US government agencies.