Is duolingo confused???
When learning Turkish, it first taught me that "pasta" meant "pasta." Now, in the food section, it's telling me that "makarna" means "pasta" and that "pasta" means "cake." What's happening here?
Turkish 'pasta' is borrowing from Italian 'pasta' which is cognate with Fr. (and En.) 'pâtisserie', whereas 'makarna' is from It. 'maccherone', which is cognate with 'macaroni'.
The Turkish course certainly hasn't mixed them up; however, 'pasta' does mean pasta in most languages on Duo, so you probably have a false memory of seeing it meaning pasta in Turkish.
The difference between "kek" and "pasta" is that "pasta" is the decorated one with frosting/icing/fondant or similar.
"Kek" is just the main cake part (the cooked part made of eggs, sugar, flour ...) and can have things like cocoa powder, nuts, fruit etc cooked in it.
Once you decorate a "kek" with icing/frosting it turns into "pasta"
But it's not a big problem if you say the wrong one. Nobody really cares, desert is desert :-)