He bought it through Google Domains.
From the Name Registration Agreement:
Registration Acceptance. Google may accept or reject Registrant’s
application for registration or renewal for any reason at its sole
discretion, including, rejection due to a prohibited, improper,
unavailable, infringing or otherwise questionable domain name. Google
is not liable or responsible for any third party’s errors, omissions
or other actions arising out of or related to Registrant’s domain name
application, registration, or renewal, including any Registry Operator
administrator’s failure to register or renew a domain name.
Google has not commented publicly but presumably they had some alert set up which sprung them to action and they cancelled. Arguably, if the registration had been with a different registration agent, Google would not have had the power to reverse the transaction and would have needed to use the dispute process. Keep in mind though, this thing is being called a bug, it's not like Google let the registration expire and it got snapped up.
EDIT TO ADD:
The Uniform Domain Name Dispute Resolution Policy provides the rules for resolving these disputes. Somewhat obvious these days is that trademark owners have certain rights over domains which are their trademark or which are similar to their mark. However, the analysis does not stop at the existence of a bona fide trademark. The use to which the domain is put matters.Specific to the present facts:
A finding of the following shall demonstrate (SHALL DEMONSTRATE) your rights or legitimate
interests to the domain name for purposes of Paragraph 4(a)(ii):
(4)(c)(iii) you are making a legitimate noncommercial or fair use of the
domain name, without intent for commercial gain to misleadingly divert
consumers or to tarnish the trademark or service mark at issue.
The reference to (4)(c) is referring to the section where we read that "complainant must prove that each of these three elements are present" -- EACH OF THESE THREE:
(i) your domain name is identical or confusingly similar to a
trademark or service mark in which the complainant has rights; and
(ii) you have no rights or legitimate interests in respect of the
domain name; and
(iii) your domain name has been registered and is being used in bad
faith.
The complainant FAILS THIS TEST if the registrar shows "legitimate noncommercial or fair use." (Remember, this is from the SHALL DEMONSTRATE part, supra)
In other words, there is a dispute process which must be followed. Just because someone registers Google does not mean that Google automatically gets it back.