Hi and welcome to the forums
According to a well known on line information base
" The project manager, Ryan Gibson, conceived of the confections naming scheme that has been used for the majority of the public releases, starting with Android 1.5 Cupcake in April 2009."
Presumably he just liked the idea. Earlier versions were named after fictitious robots.
Roger