I can't give a linguistic founded answer, and I doubt there is a common rule for "für" and "zu".
Maybe a good approach is the following:
Use "zu" in a context like "for a special purpose or activity".
Use "für" in a context like "for a special item or person".
Ich brauche Kakao für meinen Kuchen <- "Kuchen" is the "special item"
Ich brauche Kakao zum Backen <- "Backen" is the "special purpose"
Another rule, referring to "special items" only:
Use "zu" for something that is already finished.
Use "für" for something to be done.
"Zucker zum Kaffee": The sugar is not necessary for the coffee to exist.
"Kekse zum Tee": The tea is tea, whether with or without cookies.
Following that strategy, in your example "Kakao zu Desserts" one would understand "put some cacao on your dessert". This is surely not the intention in this context, although it may be delicious for some desserts :-)
Instead, "Kakao für Desserts" means "for the preparation of desserts", i.e. the dessert is not yet finished. The cacao is intended to be used for the preparation of the dessert.
With the cake above it's the same: "Ich brauche Kakao für meinen Kuchen, den ich backen werde"
However these rules are just my two cents. But maybe my answer inspires someone to improve instead of downvoting? ;-)