Bitcoin is a decentralized digital currency. It is meant to be resistant to corruption and external control. That is the reason it was created.
Bitcoin achieves this only through the approach where consensus of the ledger is achieved by performing work.
Bitcoin is vulnerable -- this consensus mechanism can be blocked by anyone with 51% of the mining network capacity. To prevent anyone from having that ability to block, the mining network needs to be large enough so that there it is vastly economically unfeasible for an attacker to disrupt the network.
So to achieve this requirement of being protected with a ginormous amount of hashing capacity, the mining process is subsidized. This subsidy comes from the issuance of new currency. This subsidy helps to bootstrap the currency by putting it into many hands who might be willing to spend the funds for goods and services which draws merchants and service providers into the bitcoin economy.
So the combined goals of bootstrapping the bitcoin economy and ensuring that mining capacity is more than sufficient to dissuade any 51% attack are two reasons to release mining code and letting mining revenues be distributed to those willing to participate.
Because bitcoins aren't always circulating, there must be some willing to hold bitcoins as a store of value at all times. Again, Bitcoin has value only because it is a decentralized digital currency that is resistant to external control. If it doesn't have that then it is simply an online ledger -- no different than what PayPal provides, or what your online banking system provides. There are plenty of other open source ledger software options for this.
Only from the protocol being open (and trusted as being open by having the software being open as well) would an investor that is willing to hold bitcoins be assured that the currency truly is decentralized.
For Bitcoin to be valued, the source code had to be released. If the source code were never released, Bitcoin would never have achieved any value.