It is not really Google's fault that Code was not a successful product, other than that they simply didn't have the energy/budget/will to actually make it a competitive product with Github.
Saying Google "doesn't have the budget" to do something is fairly preposterous, tbh. I can understand that they were wrong-footed by the rise of Github; Code was built to compete with Sourceforge, when GH didn't even exist. From day 1 though, it was clear that Code wasn't even "better enough" to actually kill SF for good; further development was incredibly slow. When Github hit their stride, Google reacted by just giving up. They didn't even attempt a comeback.
well, google isn't a small business, where "the budget" can be synonymous with "the bank account(s)". like many (all?) large businesss, things are organizationally regimented into units (and sub-units, etc), and budgets are allocated toward each unit.
so while "google" might have funds, the "google code development team" may have a very tiny allocation.
Of course, but budget allocation does not descend from Heaven fully formed, so to speak. Google directors (i.e. Google) decided Code was not a priority, so in the end it's Google-the-company's fault that it had to close.
I think there was no reason for them to keep Google Code as a going concern with the rise of Github. They were not going to do as good a job as Github, and it wasn't something they were making any money off of.
Even if they had been trying.
But yes, like many Google products, it was basically released and abandoned. They weren't trying. (If they had been, maybe we never would have had a github...)
I do think as a public service, they could have left all the code (and wiki documentation) accessible read-only virtually perpetually. Surely they can afford that.
Instead, we get tarball download only, and only until late 2016, after which it's all gone forever, if it hasn't been migrated elsewhere by code owners or third parties.