In general, when a talented employee (like OP) does something like this, the response is usually something like:
“We appreciate and love your initiative, and we want to encourage you to keep doing this kind of work. However, this needs to be taken down, and you need to make sure this does not happen again.”
Usually, these things are not career-ending moves. Actually it might be even opposite. Sure one might get labeled as a “cowboy”, but there is always some executive who will support “cowboys” because they shake things up. So one can actually get a promotion.
So I think there is something more here.
Either Google handled this very badly (and organization is broken) or the OP did not act in the company’s best interest and intentionally refused to follow certain instructions.