A non-generic brand name for their O-release? Did they strike a deal with Nabisco/Cadbury? I can't imagine Google doing this without some form of legal go-ahead from the trademark owner.
Actually, KitKat is trademarked by Nestlé. Hersheys has a limited license to produce it in the US, and the ad campaign for Android was done with Nestlé.
(And the Nestlé version actually uses real swiss chocolate, and tastes a lot nicer)
They did, of course. Little known fact: Google is one of the largest tenants in Chelsea Market, which used to be the factory were Oreos were first made.
In case of 4.4 KitKat it was the idea of Nestle's advertising agency, J. Walter Thompson [0]. It was novel at the time, and it as more than just jumping on the letter "K", because it tied the "have a break, have a kitkat" line with the idea that people reach for their smartphones when they have a break. Now I imagine it's just people in suits negotiating the deal for the next release name.