There are involved different culinary traditions: in Italy there aren't bakeries! If I'm not wrong at the Anglo-Saxon bakery you can buy cakes, puddings, muffins, meat pie.. sweety and salty things, anything "baked". Traditionally you can't buy creams or jellies in a bakery, do you?
In Italy, "panetteria" is where you buy bread (a lot of type of bread) and nothing else (maybe some biscuits, of course nothing with meat); "pasticceria" is where you buy only sweets: cakes, creams, tiramisù, biscuits, fingerfoods, candies, chocolate etc. (nothing salty and no bread); "gastronomia" is where you buy all the rest "baked" (lasagna, roast beef, meat pie etc.)
I don't know how duolingo chose the right answer.. it depend on the context, I think.
Well, then maybe cake shop shouldn't be shown as a translation for the word. Either that or it should be accepted as a correct answer.
Ma questo non è vero!! C'è uno sbaglio qui! Vedi: 'la pasticceria' non è 'the bakery', però significa 'a confectionery' (= a store, where the sweets are sold!)! La traduzione esatta per 'the bakery' (= a store, where the bread is sold!) è 'la panetteria' ("Il nostro pane quotidiano.." = "Our daily bread..") o ancora meglio 'il panificio'. Siccome non c'è di pochissima sbagliata qui, è proprio e davvero così! ;)
The translation that Duo give as "correct" is totally wrong.
Pasticceria is in italian language a shop where you can buy pastry and cakes (usually with the production inside even sometimes they don't bake inside but only sell ).
There correct translation of bakery is "panetteria" a shop where is sold and a lot of time is made the bread.
Even if sometimes the shop called "panetteria" is the place where cakes, and cookies and pastry are bake and sell , pizza and flat bread are baked and sold the name bakery is connected with the place where the bread is bakes and sold.
Bread = Bakery Panettteria o Banettiere
Pastry and Cakes = Pastry shop Pasticceria