I would guess they came up with the idea of kitkat and contacted Nestle for permission to use the name and likely Nestle saw a good opportunity to use it as marketing.
Obviously just speculation on my part, but seems more likely (to me) than Google actively trying to get sponsorship on a code name.