So they went Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich , Jellybean, KitKat, Lollipop, Marshmallow, Nougat, Oreo, Pie, and then 10 (Quince Tart), 11 (Red Velvet Cake), 12 (Snowcone), 13 (Tiramisu), 14 (Upsidedown Cake), 15 (Vanilla Ice cream), and then they started over at B for Baklava? Weird.
There's an article linked, perhaps it might give some insight.
If you’re wondering why Android 15’s codename is Vanilla Ice Cream and not something that starts with the letter “A,” I can’t say for sure. It’s likely because Google had already chosen Vanilla Ice Cream as the internal codename for Android 15 before the first trunk stable release, so it didn’t want to go back and change every mention of the codename, especially since that could break some build flows.
So this build change actually originated in the upcoming Android 15, but since that codename had already been chosen they didn't rename it to A.